Created
July 15, 2013 00:12
-
-
Save Fhernd/5996713 to your computer and use it in GitHub Desktop.
Código fuente sin chequeo de desbordamiento.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SinOperadorChecked | |
{ | |
static void Main() | |
{ | |
// Este ejemplo no produce error en tiempo de compilación. | |
int diez = 10; | |
int i = 2147483647 + diez; | |
// Por defecto, la sentencia anterior no produce ninguna | |
// excepción en tiempo de ejecución. | |
Console.WriteLine(i); // El valor calculado es -2.147.483.639 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment