Does not get correct result using this code. After inserting 300 as int, I am getting 44 as the converted byte value.
I was expecting 255 as this is the closest to 300.
Console.Write("Enter int value - ");
val1 = Convert.ToInt32(Console.ReadLine());
// converting int to byte
bval1 = (byte) val1;
Console.WriteLine("int explicit conversion");
Console.WriteLine("byte - {0}", bval1);