.NET Collections and Data Structures
Learn how to apply the right collection for the task at hand.
C# provides a variety of data structures optimized for different use cases. Choosing the right collection depends on your specific requirements, such as the type of operations you’ll perform, performance considerations, and the structure of your data.

Arrays
Arrays are a straightforward and traditional way to work with a set of data.

Dictionary<T>
Use the Dictionary<TKey, TValue> type for strongly-typed, dynamic, sets of data stored with keys and values.

HashSet<T>
Use the HashSet<T> type for high performing data sets with unique elements.

List<T>
Use the List<T> type for strongly-typed, dynamic, sets of data.

LinkedList<T&>
Use the LinkedList<T> type for strongly-typed, dynamic, sets of data.

Queues and Stacks.
Use Queues and Stacks for FIFO and LIFO data sets.

SortedSet<T>
Use the SortedSet<T> type for strongly-type, automatically sorted data.

Thread-safe collections
The same collections you know and love, but thread-safe.