Click here to Skip to main content
15,888,908 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Diffrence B/W ArrayList and HashTable, Which one is synchronized and give me one Real Time example of this?

With tread example....
Posted
Updated 14-Apr-10 3:49am
v3

Do you really expect us to do your homework for you...ok..

here you go:

C# ArrayList[^] and C# HashTable[^]
 
Share this answer
 
Arraylist is a collection of objects(may be of different types).
Arraylist is very much similar to array but it can take values of different datatypes.
If you want to find something in a arraylist you have to go through each value in arraylist, theres no faster way out.

Hashtable is also collection which takes a key corresponding to each values.
If you want to find something in a hashtable you dont have to go through each value in hashtable, instead search for key values and is faster.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900