Question:

Explain Hashtable in C#?

Answer:

It is used to store the key/value pairs based on hash code of the key. Key will be used to access the element in the collection. For example,

Hashtable myHashtbl = new Hashtable();
myHashtbl.Add("1", "TestValue1");
myHashtbl.Add("2", "TestValue2");

 


Keywords:

© 2017 QuizBucket.org