How to throw an caught exception from cath block?
Answer Posted / gustav bouwer
This (as above) will re throw the exception.
catch (Exception e)
{
throw e;
}
This passes along the ORIGINAL exception so you keep your
stack trace.
catch (Exception e)
{
throw;
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is difference between a function and a method?
Whats an assembly? Describe the importance of assembly?
What is difference between dynamic and var in c#?
Can we inherit a private class in c#?
What is a hash table c#?
Define a jagged array in c#?
Explain why do I get an error (cs1006) when trying to declare a method without specifying a return type?
What is interface inheritance?
Why do we need collections in c#?
What is a copy constructor in c#?
What is an assembly in .net?
what are some characteristics of an array?
How main method is called in c#?
Is concurrent queue thread safe?
Explain the difference between // comments, /* */ comments and /// comments?