Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
i need to insert data into database using hash table from web application.
whether it is possible?Is there any other hash oriented concepts?

can anyone explain this?
Posted
Comments
Sergey Alexandrovich Kryukov 8-Feb-12 0:33am    
Why? What is hash table is clear, not what is "hash oriented concept"? What's the idea?
--SA

1 solution

Hashtable is an older collection that is essentially obsoleted by the Dictionary in .NET framework. Also, Hashtable has worse performance than Dictionary.

Anyway, here is the sample code to maintain the data in hash table.
C#
Hashtable hashtable = new Hashtable();
hashtable[1] = "One";
hashtable[2] = "Two";
hashtable[13] = "Thirteen";

foreach (DictionaryEntry entry in hashtable)
{
    Console.WriteLine("{0}, {1}", entry.Key, entry.Value);
}
 
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