C# Generics

1m 40s

In this C# Generics lesson, we will start with an overview of generics, then look at the syntax of generics and what options are available to you. Finally, we'll go through some common use case scenarios and see how to use generics practically.

Learning Objectives

  • Learn what C# generics are
  • Learn the syntax of generics and how to implement them
  • See how to apply generics to streamline code

Intended Audience

Those who have a general understanding of C# object-oriented concepts and want to take their coding beyond the basics of treating class types as simple variables.


To get the most from this lesson, you should be familiar with C# data types and have a basic understanding of object-oriented principles. The following lessons are recommended:

To follow along, you'll need a working development environment, either VS Code or Visual Studio. The source for the demo can be found at github.com/cloudacademy/csharp-generics.

About the Author
Learning paths

Hallam is a software architect with over 20 years experience across a wide range of industries. He began his software career as a  Delphi/Interbase disciple but changed his allegiance to Microsoft with its deep and broad ecosystem. While Hallam has designed and crafted custom software utilizing web, mobile and desktop technologies, good quality reliable data is the key to a successful solution. The challenge of quickly turning data into useful information for digestion by humans and machines has led Hallam to specialize in database design and process automation. Showing customers how leverage new technology to change and improve their business processes is one of the key drivers keeping Hallam coming back to the keyboard. 

Covered Topics