Advice on an appropriate collection class

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

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
 
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.
 
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
 
Try deriving CollectionBase

Simon said:
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
 
Back
Top