Microsoft

.NET Documentation

System.Generic

The System.Generic namespace provides generic collection types, interfaces, and utilities that enable type‑safe data structures and algorithms.

List<T>

Represents a strongly typed list of objects that can be accessed by index.

var numbers = new List<int> {1,2,3,4,5};

Dictionary<TKey,TValue>

Represents a collection of keys and values.

var ages = new Dictionary<string,int> {{"Alice",30},{"Bob",25}};

Queue<T>

Implements a first‑in, first‑out (FIFO) collection of objects.

var q = new Queue<string>(); q.Enqueue("First");

Stack<T>

Represents a last‑in, first‑out (LIFO) collection of objects.

var s = new Stack<int>(); s.Push(10);

Common generic utilities include Comparer<T>, EqualityComparer<T>, and EqualityComparer<T>.Default.