Readme - Code Samples for Chapter 8, Collections

April 2, 2022 ยท View on GitHub

Collections dives into the different kind of collections, such as lists, queues, stacks, dictionaries, and immutable collections. The chapter also gives you the information you need to decide which collection to use in what scenario.

This chapter contains the following code samples:

  • ListSamples (using List<T>, IComparer<T>, predicate)
  • QueueSample (using Queue<T>)
  • StackSample.(using Stack<T>)
  • LinkedListSample (using LinkedList<T>)
  • SortedListSample (using SortedList<T>)
  • DictionarySample (using Dictionary<TKey, TValue>)
  • SetSample (using HashSet<T>)
  • LookupSample (using ILookup)
  • ImmutableCollectionSample (ImmutableList<T>)

For code comments and issues please check Professional C#'s GitHub Repository

Please check my blog csharp.christiannagel.com for additional information for topics covered in the book.

Thank you!

Updates with C# 10 .NET 6

.NET 6 contains a new PriorityQueue class which returns items based on a priority. See the new sample code PriorityQueueSample.

Also see Updates with C# 10