Advanced C# Part 2: Collections, Delegate Patterns, and Useful Generic Methods
Generic versions of .NET Collections (List< >, LinkedList< >, Stack< >, Queue< >, Dictionary<,> [the great generic replacement for HashTable], HashSet< >, SortedList<,> [keyed & list-based], SortedDictionary<,> [keyed & tree-based]), their limitations, and how to select and use them.
We will cover patterns for using generic delegates, and examine useful general-purpose generic methods. We will also see these in a simple Poker card example. From a card class (and its enumeration) and decks (collections), through shuffling (enumerating with a generic method), dealing and cheating (enumerating with collections, generic delegates), to evaluating poker hands (enumerations and surprisingly simple LINQ).
Tags: Collections | C# | Architecture