Can two catch blocks be executed?

Answer Posted / awadhesh

For a given set of try catch only one exception block will
get executed. Notice in finally what you are having is a
new set of try catch statements. They are unrelated to the
one above , so it is wrong to say here that two catch
blocks were executed.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is delimiter in c#?

683


Is null == null c#?

652


Is c# pass by reference?

699


Which attribute is used in order that the method can be used as webservice?

723


What is overloading with example?

725


Why do we need singleton pattern in c#?

718


What is data types in c#?

725


What is difference between constants and read-only?

662


Why should I use interface in c#?

732


Is string null or empty?

704


What is byte c#?

653


What is cshtml extension?

706


What is the difference between delegates and events in c#?

678


How do I create a dbml file?

722


What is typeof undefined?

684