Came across some interesting code the other day and I must admit I hadn’t seen the Where clause
used like this before:
using System;
class MyClassy<T, U>
where T : class
where U : struct
{
}
And according to the Microsoft Definition found here
where (C# Reference)
The where clause is used to specify constraints on the types that can be used
as arguments for a type parameter defined in a generic declaration. For example, you
can declare a generic class, MyGenericClass, such that the type parameter T implements
the IComparable<T> interface:
public class MyGenericClass<T> where T:IComparable { }