Created
October 20, 2011 19:26
-
-
Save sorted-bits/1302057 to your computer and use it in GitHub Desktop.
Validating Int from string
This file contains 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
public static bool IsInt(this string text) | |
{ | |
int integer = 0; | |
return Int32.TryParse(text, out integer); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment