473,320 Members | 1,814 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,320 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 1053
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.