|
-
Oct 27th, 2006, 12:40 AM
#1
Thread Starter
Junior Member
DictionaryBase
Originally made a collection class inheriting system.collections.generic.dictionary(of integer,myObject)
when looping through the objects of the collection, they were in exactly the same order as added.
I then realised I should of probably been using inherit system.collections.dictionarybase
looping through the objects this time gave me a different order than when they were added.
I am confused as to why the difference, hoping someone maybe able to explain.
-
Oct 27th, 2006, 12:56 AM
#2
Re: DictionaryBase
The order of items in a dictionary is not relevant. Dictionary items are retrieved by their key. The .NET Framework provides the SortedList, Generic.SortedList and Generic.SortedDictionary classes if order is important. You should read the help topics for each of those classes.
-
Oct 27th, 2006, 01:04 AM
#3
Thread Starter
Junior Member
Re: DictionaryBase
I already read the help on all of those.
However, that wasn't the question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|