What is the difference between the “throw” and “throw ex” in .NET?
“Throw” statement preserves original error stack whereas “throw ex” has the stack trace from their throw point. It is always advised to use “throw” because it provides more accurate error information.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
“Throw” statement preserves original error stack whereas “throw ex” has the stack trace from their throw point. It is always advised to use “throw” because it provides more accurate error information.
need an explanation for this answer? contact us directly to get an explanation for this answer