Skip to content

Instantly share code, notes, and snippets.

@DavidKlempfner
Created December 12, 2019 10:19
Show Gist options
  • Save DavidKlempfner/4083fddb2dd7ec5d2c2538827a800192 to your computer and use it in GitHub Desktop.
Save DavidKlempfner/4083fddb2dd7ec5d2c2538827a800192 to your computer and use it in GitHub Desktop.
CIL2.cs
class Program
{
static void Main(string[] args)
{
checked
{
addSomeBytes();
}
}
static void addSomeBytes()
{
byte b = byte.MaxValue; //255
b += 1; //No OverflowException here!
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment