473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Advice on an appropriate collection class

Hi all,

I'm making an authorisation system that will use a custom class/struct that
I make called Permission
A permission object has an ID, Name and a Description

My question is which collection class would be most appropriate given the
sort of operations that would be required of a permissions collections eg,

- Find based on id,
- Add,
- Remove,
- Clear

The two collections I'm thinking about at the moment are the ArrayList or
the Hashtable.

There won't ever be any more than 50 permissions loaded into one permissions
collection but the system will potentially have to deal with between 1 - 50
collections at one time depending on the number of users using the system

Many thanks to anyone who can help

Kindest Regards

Simon
Jul 21 '05 #1
3 1056
I am in a simular position, and have been looking at a custome collection,
just testing the serialization systems with it. I followed the Walkthrough
in the MSDN Docs on Custom Collections. Also there is a great example of
this on vbcity.com.

"Simon" <sh856531@microsofts_free_email_service.com> wrote in message
news:Ow**************@tk2msftngp13.phx.gbl...
Hi all,

I'm making an authorisation system that will use a custom class/struct
that I make called Permission
A permission object has an ID, Name and a Description

My question is which collection class would be most appropriate given the
sort of operations that would be required of a permissions collections eg,

- Find based on id,
- Add,
- Remove,
- Clear

The two collections I'm thinking about at the moment are the ArrayList or
the Hashtable.

There won't ever be any more than 50 permissions loaded into one
permissions collection but the system will potentially have to deal with
between 1 - 50 collections at one time depending on the number of users
using the system

Many thanks to anyone who can help

Kindest Regards

Simon

Jul 21 '05 #2
Hi,

Thanks for the pointer. I'll be sure to have a quick look.

I'm not really wanting to make a custom collection though. I really just
want to know which built in collection would be best in this instance - a
Hashtable or an ArrayList.

Thanks again

Simon
Jul 21 '05 #3
Try deriving CollectionBase

"Simon" <sh856531@microsofts_free_email_service.com> wrote in message
news:O6****************@tk2msftngp13.phx.gbl...
Hi,

Thanks for the pointer. I'll be sure to have a quick look.

I'm not really wanting to make a custom collection though. I really just
want to know which built in collection would be best in this instance - a
Hashtable or an ArrayList.

Thanks again

Simon

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 19/11/2004
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ingo Nolden | last post by:
Hi, I try to use const where ever appropriate. In a collection class I am counting the iterators that are out. The counter decrements when an iterator leaves scope or is 'Dispose( )'d While...
1
by: Dan H. | last post by:
Hello, I have an application that requires a collection that is sorted by a double field first, and then by a long field. So, lets say I have an class that has 2 fields called time, priority. I...
5
by: Paul E Collins | last post by:
I have a class hierarchy representing data importers, each of which reads lines from a particular type of comma-separated data file and creates corresponding entries in a database. There is an...
3
by: Simon | last post by:
Hi all, I'm making an authorisation system that will use a custom class/struct that I make called Permission A permission object has an ID, Name and a Description My question is which...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
6
by: V. Jenks | last post by:
I apologize if this is the wrong forum for this, I could not locate one that was exactly appropriate for this topic. Over the last couple of years I've been doing a lot of reading on design...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
8
by: george.leithead | last post by:
Hi all, I'm looking for some advice on how best to achitect the following requirement. I'm basically writing a Fantasy Football (FF) Web site, and would like to have it fully OO and have it...
3
by: shapper | last post by:
Hello, I created a simple class as follows: Public Class HelloWorld Public Function SayMessage() As String Return "Hello World!" End Function
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.