I am just searching on internet about the advantages and disadvantages of various collections of the .NET. I found the following points
- Dictionary is faster than List in the context of lookup for value.
- HashSet is faster than List in the context of lookup for value.
- Dictionary is faster than Hashtable in the context of lookup for value. None of them guarantee preserving the order of items.
- I read that Hashset is fasted collections in .NET
So I come to the following sorted order for the .NET Collections
- Hashset
- Dictionary
- Hashtable
- List
- ArrayList
For the above sorted order I have used the following links
- What .NET collection provides the fastest search
- http://cidamon.com/blog/solution/27/dictionary-hashtable-and-hashset
- http://www.dotnetperls.com/dictionary-time
- c# When should I use List and when should I use arraylist?
- http://www.dotnetperls.com/hashtable
- .NET HashTable Vs Dictionary - Can the Dictionary be as fast?
- http://www.codeproject.com/Answers/197792/Hashtable-and-List-in-Csharp.aspx#answer1
And besides the above question I found some useful links which I want to share
- What is the Generic version of a Hashtable?
- Why is Dictionary preferred over hashtable?
- Silverlight and ArrayList
Is the above sorted order is in correct order ? If not can you please rearrange it ? If anyone can add some more collections into the sorted order of the above list then it would be appreciated.