"Hal Rosser" <(E-Mail Removed)> wrote in news:ishcj.30643
$(E-Mail Removed):
> "John" <(E-Mail Removed)> wrote in message
> news:%23h%(E-Mail Removed)...
>> Hi
>>
>> I have a list of value pairs as below;
>>
>> Section Name Section Type
>> A1111 Z9999
>> B2222 Y8888
>> C3333 X7777
>>
>> What is a good intuitive way to store this information in memory? I
was
>> thinking a two-dimensional array of strings, is there a better way?
>>
>> Thanks
>
> Simplest way is with two parallel one-dimensional arrays.
With hashtables and dictionary... it's a bit amateurish to use two
parallel arrays.
> Another way is as an array of structures.
> I also liked Jeff's solution.
> His question has merit - how will you be accessing the elements?
Hashtable("SectionName") = Type
A generic dictionary can store different data types too.
Or, you could create an array of custom objects which store SectionName
/ Section Type.
--
(E-Mail Removed) (Do not e-mail)