.NET Collections
Introduction Sometimes, the proper choice of a collection can greatly impact the performance of your application. For example, there are collection types that are more appropriate for insertions, others that allow faster lookups, and so on. Plus, you must decide if you want indexed collections or not, and if you want to have generic collections, in order to have compile-time type checking. The .NET BCL comes with several general-purpose collection classes. Here is a list of all the collection classes as of .NET 9 and their intended use. Namespaces Namespace Purpose System.Collections Basic types, non-generic collections and interfaces System.Collections.Generic Generic interfaces and collections System.Collections.ObjectModel Observable and read-only collections System.Collections.Specialized Specialised collections System.Collections.Concurrent Concurrent (thread-safe) collections ( System.Collections.Concurrent Nuget package ) System.Collections.Immutable Immutable collections ( Syst...