What is the difference between Hash Table and Arrays?

Answer Posted / ravi

a) Hash table store data as name,value pair. while in array
only value is store.

b) to access value from hash table, you need to pass name.
while in array, to access value , you need to pass index number.

c) you can store different type of data in hash table, say
int,string etc. while in array you can store only similar
type of data.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a scope in c#?

470


What is the advantage of static class in c#?

507


What is the use of regex in c#?

494


So what makes your code really object-oriented #?

524


What is difference between static and readonly in c#?

444






What is difference between constants and readonly in c#?

482


Can you pass value types by reference to a method?

519


What is hashtable c#?

471


Can we have two main methods in c#?

532


Explain dataset.acceptchanges method in .net?

541


What is oledb in c#?

501


What is default value of enum c#?

455


I have 3 overloaded constructors in my class. In order to avoid making instance of the class do I need to make all constructors to private?

549


What is sorted list in c#?

506


What do you mean by streamreader/streamwriter class in c#?

522