By SkySigal on
8/11/2008 5:57 AM
The generic Dictionary is touted as the replacement for the Hashtable....but remember....enumeration through it will be different than how a Hashtable would have done it...
Read More »
|
By SkySigal on
8/11/2008 4:01 AM
Most C# coders know how to use Collections and Dictionaries, but are a bit fuzzy on the internals, and when to choose which one. This might help...
Read More »
|
By SkySigal on
8/10/2008 2:37 AM
Before NET 2.0 there was the System.Collections.SortedList (which happens to be Dictionary and therefore at first struck me as a misleading name). To complicate things, in NET 2.0 two more Generic classes were added System.Collections.Generic.SortedList; and System.Collections.Generic.SortedDictionary; Which one is the best choice for your needs?
Read More »
|
By SkySigal on
8/9/2008 4:18 AM
First of all..a System.Collections.SortedList is an (object, object) Dictionary. Secondly, the default sort direction is ascending -- but it can very easily be sorted by any order you want (eg: Descending). Here's how...
Read More »
|
By SkySigal on
8/9/2008 2:09 AM
I just talked about how to use Enumerators in terms of Queues and Stacks...but I suddenly realized that I had better cover Dictionary Enumerators as well, since its not exactly done the same way...
Read More »
|
By SkySigal on
8/8/2008 11:53 PM
One thing I've noticed is that Collection Enumerators are not fully taken advantage of. Take the Queue class...A lot of people think that because there is no indexer, that the only way to get to the items is at best, Peek. But the Enumerator is a great solution in these cases...
Read More »
|