0
Difference between throw; & throw ex;
could anyone simple explain mentioned difference between throw and throw ex? i know that its connected with stack trace. thanks
1 Odpowiedź
+ 1
"throw ex throws the same exception, but resets the stack trace to that method. Unless you want to reset the stack trace (i.e. to shield public callers from the internal workings of your library), throw is generally the better choice, since you can see where the exception originated."
https://stackoverflow.com/questions/730250/is-there-a-difference-between-throw-and-throw-ex