The compiler doesn't know what "T" is as that is defined by the calling code - it could be anything, a string, a double, an Animal class. So it can't allocate it to your int parameter.
You'd have to cast "T" into int before you assign it to your property. However, your code can only work if "T" is int so this is a pointless use of generics, if a generic class can only support one type you may as well not use generics at all and use strong types instead.
Updated;
I'd write it something like below, however again I stress that the use of generics is a bit pointless here. It's usually ok to deal with types completely generically, or to deal with base types, but writing per-type exceptions is just bad practice.
public class MyClass<T>
{
public T iLeft { get; set; }
public string sLeft { get { return this.iLeft.ToString(); } }
public MyClass(T left)
{
iLeft = left;
}
public static implicit operator MyClass<T>(T left)
{
return new MyClass<T>(left);
}
public static implicit operator Int32(MyClass<T> left)
{
if (typeof(T).Equals(typeof(Int32)))
{
return (int)(object)left.iLeft;
}
else
{
return -1;
}
}
}
class Program
{
static void Main(string[] args)
{
MyClass<int> r = 5;
MyClass<int> x = 10;
Console.WriteLine("r after creation = " + r.iLeft);
Console.WriteLine("x after creation = " + x.iLeft);
r = 3;
Console.WriteLine("r after assignment = " + r.iLeft);
int rAsInt = r;
int xAsInt = x;
Console.WriteLine("rAsInt = " + rAsInt);
Console.WriteLine("xAsInt = " + xAsInt);
int y = x * 2;
Console.WriteLine("x * 2 = " + y);
int z = r * x;
Console.WriteLine("r * x as ints= " + z);
MyClass<int> classMult = r * x;
Console.WriteLine("r * x as MyClass<int> = " + classMult);
Console.ReadLine();