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

Can an int be negative c#?

786


What is a int in c#?

688


Is c# scripting language?

689


What do you mean by expression tree?

625


Is string passed by reference in c#?

698


What is “using” statement in c#?

666


What are strings in c#?

723


What is iqueryable in linq?

649


How big is a float?

699


What Happens In Memory When You Box And Unbox A Value-type?

666


What is a Assembly?

730


What is the advantage of static class in c#?

700


What are the Types of values mode can hold session state in web.config

761


How is exception handling implemented in c#?

792


Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?

736