What is the difference between hashtable and arraylist




















Duffer Ankur we are talking about ArrayList not Array. First you read the question then post your answer. Windows 11 is Here. Read what is new in Windows What are differences between Array list and Hash table? By Ankur Jain in. NET on Aug 18 Jul, Skip to content.

Change Language. Related Articles. Save Article. Improve Article. Like Article. Last Updated : 03 Sep, Next Sort an array which contain 1 to n values.

Recommended Articles. Viewed 20k times. Improve this question. Shivam 1 1 gold badge 8 8 silver badges 28 28 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Add 2 ; al. Hope it helps. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.

The Hashtable data structure is typically an array but instead of accessing via an index, you access via a key field which maps to a location in the hashtable by calling the key object's GetHashCode method.

In general, ArrayList and Hashtable are discouraged in. NET 2. Differences are: 1. ArrayList represents the ordered collection of an object or it can be said that it is individually indexed where as Hash table uses a key to access the elements in the collection. ArrayList is used when you want to access the elements by using index where as Hash table is used when you must access elements by using an index.

Windows 11 is Here. Read what is new in Windows Difference between hash table and arraylist?



0コメント

  • 1000 / 1000