Interviews1 answer
What is the difference between Sorted Dictionary and Ordered Dictionary?
1 Answer
There are 3 main difference.
1. The namespaces
OrderedDictionary => System.Collections.Specialized;
SortedDictionary => System.Collections.Generic;
2. In SortedDictionary key/pair is sorted by key but not in OrderedDictionary.
3. In OrderedDictionary values can access either with key or index. In SortedDictionary values are only access through key.
Salman MushtaqPosted Oct 18, 2017, 5:04 AM EDT
