C# Collections Fundamentals
Starting from arrays and progressing to lists, dictionaries, and sets, this course covers the capabilities of the various collection types, how they work under the hood, and performance implications.
What you'll learn
This course aims to empower you to take advantage of the surprisingly rich set of collections that are available in C#. You'll learn how to use the various collection types to store data as arrays, lists, dictionaries, linked lists, or sets, as well as how to customize collection behavior in C#. You'll also learn how many of these types work under the hood and the implications for performance. This course also covers enumerators and the collection interfaces.
Table of contents
- Overview 2m
- What are Arrays? 2m
- Arrays in C#: Basic Usage 8m
- Arrays Under the Hood 3m
- Why Element Look-up is Fast 6m
- Why You Can't Change Array Sizes 2m
- How Arrays are Initialized 8m
- C# Syntax for Declaring Arrays 4m
- Enumerating Arrays: for and foreach 5m
- foreach is Read-Only 6m
- Replacing vs. Modifying Elements 2m
- Summary 1m
- Overview 1m
- Arrays as Reference Types 4m
- Storing Derived Instances in Arrays 2m
- What Type is an Array? 3m
- Array Covariance 5m
- What Arrays Can Do 3m
- Copying Arrays 4m
- Reversing Arrays 4m
- Sorting Arrays and IComparer<T> 4m
- Finding Elements: IndexOf(), FindAll(), etc. 5m
- Binary Search 5m
- Array Methods or LINQ? 2m
- Summary 1m
- Overview 2m
- The Interface Inheritance Tree 2m
- The Core Generic Interfaces 4m
- The .NET 4.5 Readonly Interfaces 1m
- The Old Non-generic Interfaces 3m
- IEnumerable<T> 3m
- ICollection<T> 4m
- The ICollection<T> IsReadOnly Property 3m
- Explicit Interface Implementation 1m
- IReadOnlyCollection<T> 1m
- IList<T> 2m
- IReadOnlyList<T> 1m
- IDictionary<TKey, TValue> 3m
- IReadOnlyDictionary<TKey, TValue> 1m
- ISet<T> 1m
- Summary 2m
- Overview 1m
- Introducing Dictionary<TKey,TValue> 4m
- Enumerating Dictionary Items 3m
- Looking up Dictionary Items 3m
- Modifying the Dictionary 3m
- Comparing Keys with IEqualityComparer<T> 4m
- Dictionary<TKey,TValue> Under the Hood 4m
- GetHashCode() and the Hash Code 3m
- Writing a Custom Equality Comparer 2m
- ReadOnlyDictionary<TKey,TValue> 2m
- SortedList<TKey,TValue> 3m
- Implementing a Custom IComparer<T> 4m
- SortedDictionary<TKey,TValue> 2m
- Introducing KeyedCollection<TKey,TValue> 5m
- KeyedCollection<TKey,TValue> as a List 2m
- Summary 1m