Login
Remember
Register
Ask a Question
Explain Hashtable in C#?
0
votes
asked
Oct 18, 2019
in
C Sharp
by
Robin
Explain Hashtable in C#?
hashtable-in-c#
explain-hashtable
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 18, 2019
by
rajeshsharma
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");
...