If all code is written in a try block and write a catch
block with Exception type Exception .In that scenario will
all the exceptions catched by that catch block? or any
exceptions which will not be caught?
Answer Posted / parmjit
Yes all the exceptions will be catched by this catch block.
Because all the thrown exception as derived from this class
or it's sub class.
Because even if any exception occured which is not derived
from the Exception class, it is automatically wrapped in
RuntimeWrappedException which is a derived class of
Exception class.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What are strongly typed objects?
Is .net and c# the same?
Is datetime immutable c#?
Why do we need reflection in c#?
What is tochararray in c#?
Why is xml called extensible?
What is difference between an reference type and value type in C#?
Write a program to find the angle between the hours and minutes in a clock
Are structs faster than classes?
Is it possible to inline assembly or il in c# code?
Why c# is called type safe language?
In which order the constructor is called for an inherited class?
Why do we need to override in c#?
What is different about switch statements in c#?
What is Co- and Contra-Variance in C#?