Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

C# Collections

Tags: c#

Arrays. These are not technically a collection, because arrays have a fixed number of strongly-typed objects.

Simple Collections (System.Collections)

  • ArrayList
  • BitArray
  • HashTable
  • Queue
  • SortedList
  • Stack

Generic Collections (System.Collection.Generic)

  • Dictionary<TKey, TValue>
  • HashSet<T>
  • SortedDictionary<TKey, TValue>
  • KeyedByTypeCollection<TItem>
  • LinkedList<T>
  • List<T>
  • Queue<T>
  • SortedList<T>
  • SortedSet<T>
  • Stack<T>
  • SynchronizedCollection<T>
  • SynchronizedKeyedCollection<K,T>
  • SynchronizedReadOnlyCollection<T>

Concurrent Collections (System.Collection.Concurrent)

  • BlockingCollection<T>
  • ConcurrentBag<T>
  • ConcurrentDictionary<TKey,TValue>
  • ConcurrentQueue<T>
  • ConcurrentStack<T>

Read Only Collections (System.Collections.ObjectModel)

  • ReadOnlyDictionary<TKey, TValue>
  • ReadOnlyCollection<T>
  • ReadOnlyObservableCollection<T>

References