Skip to content

Instantly share code, notes, and snippets.

@imbaker
Created February 20, 2014 09:45
Show Gist options
  • Save imbaker/9110185 to your computer and use it in GitHub Desktop.
Save imbaker/9110185 to your computer and use it in GitHub Desktop.
Single line string to int conversion
int c = int.TryParse("1", out c) ? c : 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment