I\'m currently in the process of writing my first Windows Forms application. I\'ve read a few C# books now so I\'ve got a relatively good understanding of what language feat
When re-throwing an exception the key word throw by it self. This will throw the caught exception and still will be able to use stack trace to see where it came from.
Try
{
int a = 10 / 0;
}
catch(exception e){
//error logging
throw;
}
doing this will cause the stack trace to end in the catch statement. (avoid this)
catch(Exception e)
// logging
throw e;
}