Home > Interview Questions > C#.NET > What’s the difference between ArrayList and HashTable?

What’s the difference between ArrayList and HashTable?

by Thamil   on 21/04/2015   Category: C#.NET   |  Level: Intermediate   |  Views: 1269    |  Points: 25     |  Gold 

1. ArrayList size is dynamically increased whenever new items are added.
2. ArrayList are accessed by index, if you want to get any data in the list then iterate through the list then get the data.
1. Hashtable is used when we want to access values/elements by using key.
2. HashTable accessed by key field. By using key field, we can get the value quickly in the Hashtable.

Though we can use List<T> and Dictionary<TKey, TValue> generics instead of using above arraylist and hashtable. It’s better in performance.

« Hi Dude, I am New Software Developer I have small Doubt Give me Any Suggestions Actually I Developed One Project In the Project When New User Registration my Site.The user Account How to Accept Admin Give any References and solutions... Thanks & Regards, subbareddy. T
» How to set default browser to debug asp.net application in visual studio?
Post Question  |  Question Home

Recent Posts

User Responses

No response found, be the first to review this question.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts