N
Neil B
Hi folks,
I seem to have a strange issue which is probably due more to my
(incorrect) assumptions about .NET collections than anything else.
When using the HashTable.Add() method, and then subsequently getting an
IEnumerator from that HashTable, what assumptions can I make about the
order in which items will be returned when using IEnumerator.MoveNext()?
Until now I have *assumed* that MoveNext() will return me the items in
the same order as they were Add()'d. My experience just this-afternoon
seems to suggest otherwise. SortedList is a potential solution I
suppose, but at the moment my keys are not a valid basis for comparison
of my objects.
Thanks in advance for any help.
Neil B
I seem to have a strange issue which is probably due more to my
(incorrect) assumptions about .NET collections than anything else.
When using the HashTable.Add() method, and then subsequently getting an
IEnumerator from that HashTable, what assumptions can I make about the
order in which items will be returned when using IEnumerator.MoveNext()?
Until now I have *assumed* that MoveNext() will return me the items in
the same order as they were Add()'d. My experience just this-afternoon
seems to suggest otherwise. SortedList is a potential solution I
suppose, but at the moment my keys are not a valid basis for comparison
of my objects.
Thanks in advance for any help.
Neil B