RosettaCodeData/Task/Collections/C-sharp/collections-4.cs

8 lines
255 B
C#

//Create an initialize Hashtable
Hashtable myHt = new Hashtable() { { "Hello", "World" }, { "Key", "Value" } };
//Create Hashtable and add some Key-Value pairs.
Hashtable myHt2 = new Hashtable();
myHt2.Add("Hello", "World");
myHt2.Add("Key", "Value");