Web Technologies

Difference between Array, ArrayList and List in C#

Array is a collection of items, where we can store multiple items in a single element. Similarly ArrayList and List can also store items.

The Difference Between Array , ArrayList and List are:

Array: The size of the Array must be declared while declaration.

ArrayList and List: ArrayList and List are dynamic in nature, they don’t require size of the collection while declaration. You can add or delete element in the collection at any time.

What is the Difference between ArrayList and List ?

ArrayList: ArrayList is not type-safe, you can insert any type of data.

List: List is a type-safe, you can insert data only on declared List type.


Leave a Reply

Your email address will not be published. Required fields are marked *