The type int must be a reference type in order to use it as a parameter
<p>i have a simple code, when i change the line <code>my.Test&lt;int&gt;();</code> 
to <code>my.Test&lt;string&gt;();</code> , it works but it does not work for int. </p>

<pre><code>class Program
{
    class MyClass
    {
        public void Test&lt;T&gt;()
            where T : class     // Generic Constraint
        {
            Console.WriteLine("Hello"); // Prints Hello
        }
    }

    static void Main()
    {
        MyClass my = new MyClass();
        my.Test&lt;int&gt;();

        Console.ReadKey();
    }
}
</code></pre>