private IncrementPostfixOvfInt32 ( int x ) : void | ||
x | int | |
return | void |
public void IncrementPostfixOvfInt32(int x)
{
dynamic d = x;
if (x == int.MaxValue)
{
Assert.Throws<OverflowException>(() => checked(d++));
}
else
{
checked
{
Assert.Equal(x, d++);
Assert.Equal(x + 1, d);
}
}
}