Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A
dotnetinter

What is the difference between throw vs throw ex ?( C# Interview questions with answers)

When it comes to .NET error and exception handling this is one of the favorite .NET interview question. Below is the simplest one line answer for the above question.

“In throw the original stack exception is maintained while in throw ex the original stack exception is cleared completely.“

To understand the above one liner answer you can watch this .NET interview question video which explains throw vs throw ex in C#.

Tags: # error handling interview questions, # interview answers, # interview questions, .net exception interview questions, .net interview answers, .net interview questions for experienced, c, it interview questions, junior .net developer interview question, senior .net developer interview question, throw vs throw ex
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments