Hello,
I have discovered that if i run following lines of code.
int i = 7;
i.GetHashCode(); //where GetHashCode() is the derived
//function from System.Object
No boxing is done, but if i call i.GetType()
(another derived function from System.Object
) in place of GetHashCode()
, a boxing will be required to call GetType()
, Why its not possible to call GetType()
on primitive type instance directly, without boxing, while its possible to call GetHashCode()
without boxing ?