We always encounter having to convert a string to an integer. Most of us just unconsciously type in the following
int myNewInteger = Int32.Parse(string)
The problem with this approach is what if the value of notInteger is null or something not an "integer". So there comes the problem of handling the exceptions etc etc
So here comes the Int32.TryParse() method from our .Net Framework 2.0. It converts the string to an integer(32 bit signed) and also a return value indicating if the operation succeeded. This is pretty cool.
Check out the performance profiling of all the three parser methods Convert, parse and tryParse