What is the difference between throw and throw ex?

 Posted by Rajeshatkiit on 12/15/2015 | Category: C# Interview questions | Views: 3995 | Points: 40
Answer:

Throw does not clear the stack trace so all the classes from where the exception originated will appear in inner exception and stack trace. When we throw an exception by using throw ex, the stack trace is cleared,
and only the last exception is visible.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response