What is the difference between Hash Table and Arrays?

Answer Posted / kanan

Following are some diff.

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

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

3) 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.

correct me if i am wrong.

Is This Answer Correct ?    27 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the variables in c#?

494


What is lazy in c#?

506


Which attribute adorn a test class to be picked up by the NUnit GUI in the NUnit test framework?

547


Why do we use constructors in c#?

577


What is meant by desktop application?

497






How to Show Message box in Metro Style App?

563


What's the difference between an integer and int?

526


What is the use of oops in c#?

502


Which of these statements correctly declares a two-dimensional array in c#?

648


What is dictionary collection in c#?

495


what is IDisposal interface

669


Why data types are important?

522


Can a method return multiple values in c#?

447


how encapsulation is implemented in c#

633


In a single .NET DLL how many classes it contains?

512