Saturday, November 13, 2010

Better Performance Using Optimized Exception Handling

Speed up your application by removing exception handling in release builds. 

try
{
  //some database access code
}
catch (Exception ex)
{
#if DEBUG
  // Never happens. Hit the debugger if it does.
  System.Diagnostics.Debugger.Break();
#endif
}

No comments:

Post a Comment