Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to display the items how i enter the key and values to console how shall i do these?

C#
Hashtable myHashTable = new Hashtable();
			myHashTable.Add("1", "dotnet");
			myHashTable.Add("2", "tutorials");
			myHashTable.Add("3", "w3mentor");
			myHashTable.Add("11", "dotnet");
			myHashTable.Add("23", "tutorials");
			myHashTable.Add("33", "w3mentor");
			foreach (DictionaryEntry dictionaryEntry in myHashTable )
			{
				Console.WriteLine("{0}{1}",dictionaryEntry.Key,dictionaryEntry.Value);



}
Here Out put displayed
23tutorials
33w3mentor
11dotnet
1dotnet
2tutorials
3w3mentor
Posted
Updated 25-May-12 10:17am
v2

1 solution

Please try with HybridDictionar. It has same features as like HashTable.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900