Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created July 15, 2013 00:24
Show Gist options
  • Save Fhernd/5996734 to your computer and use it in GitHub Desktop.
Save Fhernd/5996734 to your computer and use it in GitHub Desktop.
Uso del operador checked.
class UsoOperadorChecked
{
static void Main()
{
int diez = 10;
// Expresión con operador checked
Console.WriteLine(checked(2147483647 + diez));
// Bloque de código con operador checked
checked
{
int i = 2147483647 + diez;
Console.WriteLine(i);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment