Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is hash table

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


Please Help Members By Posting Answers For Below Questions

Can one drop a column from a table?

1068


What is purpose of normalization?

998


what is isolation level at dead lock?

2209


How to create a new schema in a database?

1208


Which autogrowth database setting is good?

1096


Can we use trigger new in before insert?

963


What is sql service broker?

1026


What is the language structure to add a record to a table?

1074


What is right outer join in sql server joins?

1220


What are the difference between data mart and data warehouse? : sql server analysis services, ssas

1012


Suppose you want to implement the one-to-one relationships while designing tables. How would you do it?

996


What is acid properties?

1190


What is Service Broker in sql server 2012?

1073


What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas

1321


Explain the types of indexes.

1295