.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani

Home >> Interview Question >> C# >> Post New Question Subscribe to Interview Questions

Can multiple catch blocks be executed?

Posted By :Ghanashyam Nayak     Posted Date :September 09, 2010    Points :10   Category :C# 
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.

You can also find related Interview Question to Can multiple catch blocks be executed?  below: 

Can multiple catch blocks be executed for a single try statement?

No. Once the proper catch block processed, control is transferred to the finally block (if any).

So we can not execute multiple catch block in one try block (More...)

Can multiple catch blocks be executed for a single try statement?

No. Once the proper catch block processed, control is transferred to the finally block (if there are any). (More...)

Can code inside multiple catch block be executed?

No, Code can not execute in mutiple catch block (More...)

Can we put multiple catch blocks in a single try statement in C#?

Yes. Multiple catch blocks may be put in a try block. (More...)

Does C# support multiple inheritance?


C# does not support multiple inheritance. A class can inherit from maximum one base class, although it can implement any number of interfaces. Like Java, C# does not support multiple inheritance, meaning that classes cannot inherit from more than one class (More...)

Can we have multiple threads in one App domain ?

One or more threads run in an AppDomain. An AppDomain is a runtime representation of a logical process within a physical process. Each AppDomain is started with a single thread, but can create additional threads from any of its threads.
Note :- All threading classes are defined in System.Threading namespace. (More...)

Why is catch(Exception) almost always a bad idea?

Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project. (More...)

Is it possible to add multiple Machine.config file?

No, it is not possible to add more than 1 machine.config file. if we want to overwrite any setting than that can be achieve with the help of web.config. (More...)

How can you cache Multiple Versions of a Page?

Using output cache you can cache multiple versions of the page.

We can either use,.

- @ OutputCache directive at design time declaratively for Declarative Approach

- Response.Cacheclass at runtime for Programmatic Approach .

With @ OutputCache directive four parameters of VaryByParam , VaryByControl, VaryByHeader, VaryByCustom allows user to cache page depending on query string, control value, request's HTTP header, request's HTTP header respectively.

For an example:

To turn off caching,

Declarative Approach:
<%@ OutputCache Location="None" VaryByParam="None" %>

Programmatic Approach:

To cache the output for each HTTP request that arrives with a different ID:

Declarative Approach:
<%@ OutputCache duration="60" varybyparam=" ID" %>

Programmatic Approach:
Response.Cache.VaryByParams["ID"] = true; (More...)

Suppose you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler?

Add an OnMouseOver attribute to the button. Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();"); (More...)

Can you store multiple data types in System.Array?

No, If the System.Array is of Some Particular Data Type.(Primitive Data Type)

yes, If the System.Array is of Object Type.

Ex :

create an array of objects.

int in = 50;
string st = "Fifty";

object [] obj = new object[2];
obj[0] = in;
obj[1] = st; (More...)

How do I combine multiple sheets into one?

To combine multiple/partial style sheets into one set the TITLE attribute taking one and the same value to the LINK element. The combined style will apply as a preferred style, e.g.:


Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend