I want to cast an Int32 value to Int16 value. Data lost when casting is not a problem to me. But a System.OverflowException
says the Int16 type value is too large or too small.
Dim num As Int32 = &HFFFFFFF
Dim num2 As Int16 = Convert.ToInt16(num)
Debug.WriteLine(num.ToString("X4"))
Debug.WriteLine(num2.ToString("X4"))
If I want to cast an Int32 &HFFFFFFF to &HFFFF so what should I do.
Any help would be appreciated.