Can multiple catch blocks be executed?
Answers were Sorted based on User's Feedback
No.We may have the multiple catch block.Every catch block
has the different exception.when code found any error
suitable exception will be fired.but only one catch block
executed.
| Is This Answer Correct ? | 20 Yes | 1 No |
Answer / daniel
No, once the proper catch code fires off, the control is
transferred to the finally block (if there are any), and
then whatever follows the finally block.
| Is This Answer Correct ? | 16 Yes | 3 No |
Answer / kumarraju
Not Executed Multiple catch blocks, exception raised then
corresponding catch block only executed, after that finally
block executed. In case Exception is not raised then
finally block executed.
why you are writing multiple catch blocks than
one catch blocks?
Ans: you does not know what the exception raise, then you
are excepting some exceptions thats only you write multiple
catch blocks.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / guest
It is possible to use more than one specific catch clause
in the same try-catch statement. In this case, the order of
the catch clauses is important because the catch clauses
are examined in order. Catch the more specific exceptions
before the less specific ones.
source: msdn
| Is This Answer Correct ? | 3 Yes | 6 No |
Why do we need private constructor in c#?
list the steps in code compilation in c#?
What is default constructor c#?
What is ildasm and obfuscator in net?
Why do we need interfaces in c#?
What is the use of generics in c#?
How can I get around scope problems in a try/catch?
What is javascriptserializer c#?
Hi to everybody. Lastweek i had taken an interview on c#. They ask what is boxing & unboxing, Masking.Please tell the answer and it is useful for me.
What is the process of Serialization?
What is enumerable in c#?
Explain what a diffgram, and a good use for one Define diffgram? How it be used?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)