what is the difference between arraylist and hash table
using a simple program?

Answer Posted / digvijay

Hi,

Arraylist is a item collection of different datatypes.
Hashtable is a collection key value pair.

Array list is a list
In this we can add items to the list
Here we can add any datatype value, every item in arraylist
is treated as object

Hash table is a map
Here we can add data with the key
Retriving data in hash is faster then in array list.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does google use c#?

606


Why do we use virtual methods in c#?

587


What is the difference between as and is operators in c#?

520


What is the difference between constants and read-only?

558


What do you mean by directing?

571






What is array and its types in c#?

608


What is difference between arraylist and list in c#?

514


Explain the difference between const and static read-only?

589


What is the class in c#?

576


Is vs as c#?

596


Define delegation in .net?

574


if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.

2014


What's the difference between System.String and System..StringBuilder in C#?

580


Is namespace necessary in c#?

581


What is the difference between ref and out in c#?

535