Collection Classes in .net - the ListDictionary
This is the fourteenth part of an article on collection classes in .net with C#. This part covers the ListDictionary.
For the first part see http://www.audacs.co.uk/ViewPage.aspx?PageID=512
For the next part on NameValueCollection see http://www.audacs.co.uk/ViewPage.aspx?PageID=527
This class implements IDictionary using a singly linked list. Recommended for collections that typically contain 10 items or less.
I cannot see anything at the interface end which is linked list like so looks like the linked list usage is just under the hood so not sure what the point of that is?
It can be found at System.Collections.Specialized.ListDictionary
It contains key value pairs which are in the form of DictionaryEntry objects and items are retrievable via iteration or via key.
Below is a sample program showing the typical usage of this class.
The output from this program is as follows:
Thats as much as there is to the ListDictionary.
For the next part on NameValueCollection see http://www.audacs.co.uk/ViewPage.aspx?PageID=527