public class NumericTypesConversion
{
public static void Main()
{
// all implicit
sbyte v = 55;
short v2 = v;
int v3 = v2;
long v4 = v3;
// explicit to "smaller" types
v3 = (int) v4;
v2 = (short) v3;
v = (sbyte) v2;
}
}
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok