Which of the following code snippets for catch shows a better way of handling an exception?
1.
catch (Exception exc)
{
throw exc;
}
2.
catch (Exception exc)
{
throw;
}
Correct Answer: 2 is better as it maintains the call stack.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More C# MCQ Questions