Error!
Success!

Throw vs Throw ex

0
kicks

Throw vs Throw ex  (Unpublished)

A common mistake a lot of new .Net developers do is using Throw ex instead of just Throw. The difference between Throw ex and Throw is very simple but can cause major headaches when it comes to maintenance. If you use Throw ex it overwrites the stack trace this makes it very hard to find the original line of the thrown exception as you can see in the example I have provided.


Kicked By:
Drop Kicked By: