Hi,
following code behaves strange (at least for me):
int testValue = 1234;
this.ConversionTest( testValue );
private void ConversionTest( object value )
{
long val_1 = (long) (int) value; // works
long val_2 = (long) value; // InvalidCastException
}
I don't understand why the direct (explicit) cast to long doesn't work. Can someone explain this behaviour?
Thanks