I try to cast from Object type to decimal:
Object obj = new Object();
obj = 10;
decimal dec = (decimal)obj;
but in this row decimal dec = (decimal)obj , I get this Exception:
Specified cast is not valid.
Any idea why this unboxing can't be implemented?
Thank you in advance.