Dictionary Class : Generic collection

Ordered Dictionaries

An ordered dictionary is a collection class in which items can be manipulated by either their index or their key 
System.Data.InternalDataCollectionBase : From which data collections such as 
- DataTableCollection  
- DataColumnCollection 
are derived, is an example of an ordered dictionary. Items can be accessed either by their name or their 
index in the collection.

If we get interface , so it will be more advantage for developers
so

IOrderedDictionary <TKey,TValue>

System.Collections.IOrderedDictionary : 
Similar to the IList and IDictionary interfaces, the IOrderedDictionary interface defines a consistent contract for ordered dictionary implementations which ensures that items can be accessed, inserted, and removed by index or key.

Note: in the following discussion, accessing the dictionary by key is assumed to be a O(1) operation, although in reality this is dependent on the implementation of the GetHashCode method of the key type.



Comments

Popular posts from this blog

Add Serial no in crystal report without coding

Working with Oracle's BLOB and Microsoft's C#

File operations in C# (.net)