Difference Between throw and throw ex in C# | throw vs throw ex in C#

Published: 19 February 2022
on channel: ALLCPL
1,026
13

Difference Between Throw and Throw ex in C# | Throw vs Throw ex in C#

throw:
1. throw is used to throw a current exception
2. throw does not reset stack trace and you will get information about the
original exception.

throw ex :
1. throw(ex) mostly used to create a wrapper of exception
2. throw(ex) will reset your stack trace so the error will appear from the line
where throw(ex) written 



#ThrowVSThrowexinC #C #InterviewQuestionandAnswers


Watch video Difference Between throw and throw ex in C# | throw vs throw ex in C# online without registration, duration hours minute second in high quality. This video was added by user ALLCPL 19 February 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,026 once and liked it 13 people.