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 basic steps are needed to display a simple report in crystal?
What is a nullreferenceexception?
What does this keyword mean in c#?
Is there hashmap in c#?
What is c-sharp (c#)?
Explain how many types of exception handlers are there in .net?
I have 3 overloaded constructors in my class. In order to avoid making instance of the class do I need to make all constructors to private?
What is the difference between ienumerable and enumerator?
What is datareader c#?
What are the advantages of properties in c#?
What is the difference between select and selectmany?
Write a console application and implement the ternary operator to decide whether the age a user entered after being prompted is allowed to vote or not(given that only citizens between 18 and 120 years only inclusive can vote). Use exception handling for non-numerical input.
Which controls do not have events?
Can a struct be null?
How does bubble sort work?