Collection Question

JDYoder

Centurion
Joined
Nov 18, 2003
Messages
144
If I create a collection with the optional Key value, I realize I can reference items with the Key. However, if I already have the index of an item in the collection, can I use it to determine what the Key of that item is?

Assuming not, what type of data type / structure should I use if I want to access an item via it's Key, or access a value's Key is I know the index? (Arrays won't work because my Key value is not always numeric).
 
check out the
System.Collections.Hashtable class.
It provides key-value based collection.
Read .NET Framework class library document for more detail.
 
Back
Top