Advanced C# 7 Collections
Learn to use the full range of Microsoft collections, from lists and dictionaries to sets, queues, and concurrent and immutable collections. This course will explore the principles of ensuring code with collections is scalable and robust.
What you'll learn
Understanding how to use collections properly is a vital part in writing effective C# applications. In this course, Advanced C# Collections, you'll learn how to use the full range of Microsoft collections and understand how to ensure collection elements are unique using sets, along with customizing dictionary key lookup and sorting of elements. First, you’ll develop an understanding of the principles of collection scalability, which is important to ensure performance stays acceptable when dealing with very large collections. Then, you'll discover how to make your code around collections more robust by using collection interfaces to decouple code, and read-only and immutable collections to protect your data. Finally, you'll delve into using collections in a multi-threaded scenario using the concurrent collections. By the end of this course, you'll have the knowledge needed to effectively choose the most appropriate collection for any reasonable situation, and leverage that collection following good practices.
Table of contents
- Overview 1m
- Why Collection Performance Matters 2m
- O(n) Operations and Scalability 4m
- What Does O(1) Mean? 2m
- The Perils of O(n squared) 2m
- Collection Scaling Review 3m
- Introducing the TourBooker Demo 3m
- Importing Countries into a List 3m
- Displaying the List in a ListBox 3m
- Linear Searching with List.Find() 3m
- Sorting: List.Sort() vs. LINQ 4m
- Summary 1m
- Overview 1m
- Creating a Dictionary from a List with LINQ 2m
- Looking up Countries by Key 3m
- Solving Case Sensitivity with an Equality Comparer 3m
- Enumerating Dictionaries 2m
- Dictionary Enumeration Order Is Unspecified 1m
- Introducing SortedDictionary<TKey, TValue> 3m
- SortedList vs. SortedDictionary 2m
- Using a Custom Type as a Key 4m
- Overriding Equality for Keys 4m
- The Importance of GetHashCode() 4m
- Summary 1m
- Overview and Introducing the Demo 3m
- Introducing LinkedList<T> 4m
- Fast Changes but Slow Lookup 3m
- Nodes and LinkedListNode<T> 2m
- Adding to a Linked List with AddLast() 4m
- Removing from a Linked List with Remove() 2m
- Inserting into a Linked List with InsertBefore() 1m
- LinkedList<T> Pros and Cons 3m
- SortedDictionary Is Back 3m
- Taking Advantage of Dictionary Key Uniqueness 3m
- Summary 1m