Introduction to generics in C# Part 5
March 8, 2016 1 Comment
Introduction
In the previous post we looked at how to declare multiple type parameters. We saw that it was a very simple thing to do. We just add as many parameters as we need and separate them by a comma. It’s perfectly fine to refer to those parameters later on in the class level functions. It’s equally fine to put multiple parameters on the function level as well if you don’t want to make the entire class generic.
In this post we’ll take a quick look at parameter type constraints.
