System.Collections.Hashtable

Added in .NET 1.1
Consider upgrading to System.Collections.Generic.Dictionary

System.Collections.Hashtable 

This collection stores information based on their unique key
Their key has an Int21 data type and is called a hash code.
This is a collection of key/value pairs that are organised based on the hash code of the key.


System.Collections.Specialized

StringDictionary
ListDictionary
StringCollection


This is a helper class for other classes
We can use it to constomise equality operations for a type.


System.Collections.Hashtable myHashtable; 
myHashtable = new System.Collections.Hashtable();

myHashtable.Add("Mon", new System.DateTime(2020,10,3));
myHashtable.Add("Tue", new System.DateTime(2021,10,3));
myHashtable.Add("Wed", new System.DateTime(2022,10,3));

if (myHashtable.ContainsKey("Tue")
{
   System.DateTime myDateTime;
   myDateTime = (System.DateTime)myHashtable["Tue"];
}



© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext