C# Generics

Visit Tutorial Page ( Report)

Generics are a powerful feature of the C# language that allow you to create type-safe data structures and APIs. This course will examine generics from every angle. We'll look at the built-in generic collections of the .NET framework, and use generic classes, interfaces, and delegates in building custom collections. There are tips for cleaning up and hiding generic noise from business logic, as well as a thorough demonstration of constraints, covariance, and contravariance in building APIs for a custom repository and inversion of control container.

  • C# Generics - Why Generics?
    00:23:08
    • Introduction
      00:00:25
    • The Buffer Problem
      00:02:48
    • The Object Solution
      00:06:37
    • Copy and Paste For Victory
      00:02:38
    • Generic Type Parameters
      00:02:02
    • A Generic Circular Buffer
      00:03:30
    • Generic Terminology
      00:04:19
    • In Conclusion
      00:00:49
  • Working with Generic Collections
    00:47:49
    • Introduction
      00:00:34
    • List Things
      00:07:53
    • Queue Things
      00:04:56
    • Stack Things
      00:04:15
    • Set Things
      00:06:10
    • Link Things
      00:05:23
    • Map Things
      00:10:28
    • Sort Things
      00:05:56
    • Summarize Things
      00:02:14
  • Generic Classes and Interfaces
    00:40:28
    • Introduction
      00:00:30
    • New Requirements
      00:02:04
    • A Buffer Interface
      00:03:44
    • Yet Another Buffer
      00:03:37
    • Circling Back
      00:04:22
    • The Great IEnumerable<T>
      00:06:34
    • Collection Interfaces
      00:03:18
    • Comparing Employees
      00:10:52
    • Cleaning Up Generics
      00:05:02
    • Summary
      00:00:25
  • Generic Methods and Delegates
    00:45:40
    • Introduction
      00:00:30
    • Generic Methods
      00:09:42
    • Extension Methods
      00:08:34
    • Generic Delegates
      00:06:38
    • Everyday Delegates
      00:05:59
    • Converting the Converter
      00:06:27
    • Events and Generics
      00:07:12
    • Summary
      00:00:38
  • Constraints, Covariance, and Contravariance
    00:45:59
    • Introduction
      00:00:26
    • Generics So Far
      00:02:27
    • Model Objects
      00:01:47
    • The Goal
      00:01:46
    • Repositories and Constraints
      00:09:39
    • Commit and Query
      00:03:09
    • An Interface Constraint
      00:04:29
    • Constraints On Parade
      00:08:15
    • Covariance
      00:07:10
    • Contravariance
      00:05:40
    • Summary
      00:01:11
  • Generics and Reflection
    00:41:57
    • Introduction
      00:00:39
    • Instantiating Generic Types
      00:08:40
    • Invoking Generic Methods
      00:03:04
    • Build Your Own Container
      00:06:41
    • Simple Type Resolution
      00:08:09
    • Working With Constructors
      00:05:32
    • Working With Unbound Generics
      00:08:38
    • Summary
      00:00:34
  • Generic Odds & Ends
    00:15:23
    • Introduction
      00:00:28
    • Generics and Enums
      00:04:19
    • The Math Problem
      00:03:43
    • Using Base Types
      00:02:25
    • Generics and Statics
      00:04:08
    • Conclusion
      00:00:20
Write Your Review

Reviews