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


Please Help Members By Posting Answers For Below Questions

What is the difference between paramaterized constructor and copy constructor?

695


What is wpf application in c#?

633


What can be done with c#?

607


Explain a MSIL ? Why is it appreciated by all developers?

821


What are async and await?

716


What is delegate in c#?

707


Explain Direct CAST vs CType ?

737


Is string a primitive data type in c#?

650


Do loops in c#?

664


What is the use of console application in c#?

677


What are the properties of string?

688


What is literal control

765


What is a property c#?

694


Is c# scripting language?

671


Is c sharp free?

711