# Inbuilt Data Structures in C#

CsharpProgrammingServer Side Programming

C# has a lot of inbuilt Data Structures. Here are two of them −

## List

Generic List<T> is a generic collection and the ArrayList is a non-generic collection. The size can be dynamicallyincreased using List, unlike Arrays.

Let us see an example.

We have set the List first −

List<string> myList = new List<string>()

## ArrayList

It represents ordered collection of an object that can be indexed individually.

Set an ArrayList as −

ArrayList arr = new ArrayList();
arr.Add(45);