Answer Posted / kumaresh
1.Hashtable is a class which falls into System.Collections
namespace.
you can create object for hashtable. For example,
Hashtable hash = new Hashtable();
2.Key and value should be added to hashtable. For example,
hash.Add(1,"God");
hash.Add(2,"Human");
3.The key, value will be sorted automatically based on the
Hashcode generated[this operation is taken care by CLR].
4.GetHashCode() method is used to get the generated hashcode
5.While retrieving the hashtable values, you can use the
key tp retrieve the values. For example
foreach (DictionaryEntry item in hashTable)
{
Console.WriteLine("Key is {0}, Value is
{1}", item.Key,item.Value);
}
NOTE: if you add the same key into the hastable, it will
not throw any compliation error, but during runtime, it
will throw "ArgumentException" error.
| Is This Answer Correct ? | 19 Yes | 4 No |
Post New Answer View All Answers
List all types of constraints in sql server?
Can you leave a union at any time?
How can sql server instances be hidden?
What are the differences between stored procedure and view in sql server?
What are the steps to follow to configure SQL*Net?
What is 'write-ahead log' in sql server 2000 ?
How display code or Text of Stored Procedure using Sql query in Sql Server ?
How do I find the sql server database version?
what is sql server? : Sql server database administration
Why truncate is ddl?
What are the different types of triggers in SQL SERVER?
What is the recursive stored procedure in sql server?
How to store and query spatial data?
Explain primary key in sql server?
Explain the different types of joins?