using System;
public class Program
{
public void Test<T>()
where T : class // Generic Constraint It allows only Reference types
Console.WriteLine("Hello"); // Prints Hello
}
public static void Main()
Program my = new Program();
//my.Test<int>(); //it gives errorr because int is not a reference type
my.Test<string>();