Hi jj5...
jj5 wrote:
What are the cases where TryParse(String, ref Int32) significantly helps performance?
Here's an example. I have an app that reads a string from a database. Half the time this string is a datetime and half the time it's a name ( we've all worked on systems like this right

). In .net 1.1 i write code like:
DateTime d = DateTime.MinValue;
try
{
d = DateTime.Parse( column );
}
catch( InvalidCatchException )
{
// swallow
}
Put this code in a web service in a loop ( reading a recordset say), and then put the server under load.
Just reading 10 records per request ( 1/2 of which fail say ) will generate 1000s of exceptions per second in the asp.net wp and really wipe out your performance ( assuming web cpu is your bottleneck etc ). I've seen a number of server apps that are coded exactly like this.
The basic problem is that the Int class can't know what its consumer means by exceptional, so shouldn't impose policy like "anything not an int is an exception" etc...that's a decision only the user of the library can make.