private ConvertExplicitOvf ( long x ) : void | ||
x | long | |
Résultat | void |
public void ConvertExplicitOvf(long x)
{
dynamic d = x;
if (x < int.MinValue | x > int.MaxValue)
{
Assert.Throws<OverflowException>(() => checked((int)d));
}
else
{
Assert.Equal(x, checked((int)d));
}
}