Non-Unique Key in Collections (how to)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to be able to create a hash table, sorted collection, or similar
object that will allow duplicate keys. I can't find a specific object to do
this. If one exists, what is it?

If not exists, any suggestions on how to accomplish my goal.

I have a long log loaded into memory. I want to keep it in its original
order, but I also want something like a hash table that will let me key
directly into specific items in the log. The key is User ID, which is not
unique. I want to be able to go to the first occurrence of User ID="Clerk"
in the hash table and use each successive hash item to point to the log until
the User ID no longers is "Clerk".

I won't go into reasons why I can't use a database and something along the
lines of the SQL LIKE statement.

Thanks for the help and advice.

--Andy Arnold
 
Andy,

You might try loading the data into a datatable and then use filtering to
look at a particular subset.

A datatable is an in-memory data store, so you won't need any external
database.

Kerry Moorman
 
Back
Top