int.TryPrase is great and all, but there is only one problem...it takes at least two lines of code to use:
int.TryPrase
int intValue; string stringValue = \"
Check out the StringExtensions class. It contains an AsInt(String,Int32) extension method that will attempt to convert a string and if unsuccessful populate it with the supplied Int32 value as default.
Example:
var intValue = "123".AsInt(-1);