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 does the parsefloat function do?
What is an int c#?
In which order the constructor is called for an inherited class?
What is Private Constructor? and it’s use? Can you create instance of a class which has Private Constructor?
What is the implicit name of the parameter that gets passed into the class set method?
What is an escape sequence in c#?
Define a class and an object?
Which of these statements correctly declares a two-dimensional array in c#?
Is string mutable in c#?
When To use HashTable In C#
What are custom exceptions?
What is type class in c#?
What is the solution if you need to manipulate sets of items?
What is xaml file in c#?
What's the difference between class and object?