private IncrementPrefixOvfInt32 ( int x ) : void | ||
x | int | |
Результат | void |
public void IncrementPrefixOvfInt32(int x)
{
dynamic d = x;
if (x == int.MaxValue)
{
Assert.Throws<OverflowException>(() => checked(++d));
}
else
{
checked
{
Assert.Equal(x + 1, ++d);
Assert.Equal(x + 1, d);
}
}
}