Possible Duplicate:
.NET - Throwing Exceptions best practices
Hi,
I have seen people re-throwing exceptions as given below. which one is optimal? Why one mechanism is optimal than the other one.
try
{
// do something
}
catch (exception ex)
{
// do something
throw ex;
}
try
{
// do something
}
catch (exception ex)
{
// do something
throw;
}