Simple play icon Course
Skills

C# 9 Generics

by Thomas Claudius Huber

Generics allow you to write type-safe, reusable, and performant C# code. This course will teach you how to build generic classes, generic interfaces, and generic methods, and how to use them in your .NET applications.

What you'll learn

Generics are a powerful feature of the C# language, they allow you to write type-safe, reusable, and performant code. In this course, C# 9 Generics, you’ll learn to build and use generic types in your .NET applications. First, you’ll explore the need for generics in C#. Next, you’ll discover how to build and use generic classes, interfaces, methods, and delegates. Finally, you’ll learn how generics behave in special cases, like with static members and mathematical operators. When you’re finished with this course, you’ll have the skills and knowledge of C# Generics needed to build and use your own generic types in your .NET applications.

Table of contents

Course Overview
1min

Course FAQ

What will you learn in this C# tutorial?

In this course, you will learn what the need for generics is and how to implement generic classes, how to create generic interfaces, write generic methods, and use generic delegates.

Are there any prerequisites for this C# tutorial?

The only prerequisite for this course is a basic understanding of the C# programming language.

What are generics in C#?

Generics are the general form, not specific. Generics allow you to define the specification of the data type of programming elements in a class or method until it is actually used in the program.

What is .NET?

.NET is a software framework for building different types of applications. In this course, .NET is the tool that lets you build and run C# programs.

Who is this C# tutorial for?

This C# tutorial is for anyone who wants to learn how to build and use generic types in a .NET application.

About the author

Thomas is a Microsoft MVP for Windows Development. He works as a developer, consultant, and trainer in the fields of .NET, C#, TypeScript, XAML, and Azure. Thomas is a well-known speaker and book author. He has written several special interest books in his areas, including an extensive handbook for Windows Presentation Foundation and a handbook on development with TypeScript. Thomas lives in Germany's Black Forest with his wife and their three daughters. In his spare time, he plays football and ... more

Ready to upskill? Get started