When i try the following :
const int x = 1000;
byte b1 = (byte)x;
//Or
byte b2 = (byte)1000;
The compiler claims that it didn't convert constant 1000 to b1 or b2.
But when i tried the following :
const int x = 1000;
byte b1 = unchecked((byte)x);
//Or
byte b2 = unchecked((byte)1000);
This code worked fine.Why?