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

if you do have a stack overflow profile.what is your ranking?

1658


How do I trim a space in c#?

631


For read-only operation which property you have to designated?

808


How do you declare a method in c#?

663


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?

741


What is the difference between returning iqueryable vs ienumerable?

675


How do I do implement a trace and assert?

763


how to Create a datagridview control with check box column with 8rows in it, the maximum number of check boxes checked should be 3, when user checks the 4th corresponding message should be displayed and check box should be checked. User can uncheck the checked boxes Note: read-only property should not be used

2588


What is difference between ienumerable and ienumerator in c#?

703


What is tuple in c#?

702


Give an example of a directcast.

682


What is nameof c#?

679


Is inheritance possible in c sharp?

825


Why do we need abstraction in c#?

663


What is the advantage of singleton class?

680