C# Generics

by Scott Allen

Generics are a powerful feature of the C# language.This course will look at the built-in generic collections of the .NET framework, and use generic classes, interfaces, and delegates in building custom collections, and custom APIs for a repository and inversion of control container.

What you'll learn

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.

Table of contents

About the author

Scott has over 15 years of experience in commercial software development and is a frequent speaker at national conferences, and local user groups. Scott is a Microsoft MVP and has authored books on several Microsoft technologies, including ASP.NET, C#, and Windows Workflow.

Ready to upskill? Get started