Nearly every program works with groups of data: a list of customers, a lookup of prices by product, a queue of jobs. C# gives you a rich set of collection types for this, and choosing the right one affects both how readable your code is and how well it performs.
This module starts with arrays, the fixed-length collection, and moves to the flexible List<T>. It then covers the Dictionary for fast lookups by key, and finishes with generics, the feature behind all of these types, including how to write your own generic methods and classes and how to constrain them.
Watch the lessons in order, then continue on to LINQ.
Layla Porter explains arrays as fixed-length collections, loops over them, and shows what happens when you need to add items, the natural lead-in to lists.
Layla Porter shows how a C# list stores and manipulates a collection of elements, building and filling a list before querying it. It also previews the next module.
Tim Corey gives a concise, practical guide to dictionaries, from looking up a value by its key to a dictionary that maps each key to a list of values.
Tim Corey explains why generics matter and how to create them, starting from List<T> and moving on to generic methods, classes, interfaces, and constraints.