Is there a way in C# to test whether the execution of a statement happens during exception stack unwinding or not?
Thanks, Marcello.
Edit: I mean something like this:
using (NewDbTransaction()) {
//do some DB stuff here
} <-- here Dispose() of IDisposable is called
void DbTransactionWrapper.Dispose() {
if (InException()) //is this possible???
Rollback();
else
Commit();
}