How To Restrict Types In C# Generics? | C# Generic Interview Question

Generic type can be restricted by using the “WHERE”  keyword. For instance below is a “GenericList” which will only take type of “Customer.
 
public class GenericList<T> where T : Customer
{
 
}