Skip to content

Instantly share code, notes, and snippets.

@Ibro
Created October 25, 2017 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ibro/b7a71592b1863b820b40d1ff7570bd78 to your computer and use it in GitHub Desktop.
Save Ibro/b7a71592b1863b820b40d1ff7570bd78 to your computer and use it in GitHub Desktop.
// Out variables
// Old way
int parsedOld;
string parseMeOld = "222224";
int.TryParse(parseMeOld, out parsedOld);
Console.WriteLine(parsedOld);
// New way
string parseMe = "3115";
int.TryParse(parseMe, out int parsed);
Console.WriteLine(parsed);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment