CSharp - C# Collections Introduction

Introduction

C# has a standard set of types for storing and managing collections of objects.

For example, resizable lists, linked lists, sorted and unsorted dictionaries, as well as arrays.

The types in the collection framework can be divided into the following categories:

  • Interfaces that define standard collection protocols
  • Ready-to-use collection classes (lists, dictionaries, etc.)
  • Base classes for writing application-specific collections

The collection namespaces are as follows:

Namespace
Contains
System.Collections
Nongeneric collection classes and interfaces
System.Collections.Specialized
Strongly typed nongeneric collection classes
System.Collections.Generic
Generic collection classes and interfaces
System.Collections.ObjectModel
Proxies and bases for custom collections
System.Collections.Concurrent
Thread-safe collections