.NET FAQs Unleashed!
Skip Navigation Links
Interview questions on Design Patterns in .NET
ASP.NET Ajax Interview Questions
Interview questions related to security
C# Interview Questions
ASP.NET Interview Questions
Interview Questions in ASP.NET 2.0
Articles at dotnetuncle.com
Skip Navigation Links
OOPs questions in .NET
Questions on .NET Framework
ADO.NET Interview Questions
Short Answer questions in .NET
Frequently asked differences in .NET
Important commonly used Acronyms in .NET
MS SQL, Oracle SQL Interview Questions
 
    
Dotnetuncle's Tip:

  aspnet_intern.exe is a new tool introduced in ASP.NET 4.5. It allows sharing of common assemblies. It helps to create and manage the store of interned assemblies.

    

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

Yes. Multiple catch blocks may be put in a try block. See code example below, to see multiple catch blocks being used in C#.

C# Example
class ClassA
{
public static void Main()
{
 int y = 0;
try
{
 val = 100/y;
 Console.WriteLine("Line not executed");
}
catch(DivideByZeroException ex)
{
  Console.WriteLine("DivideByZeroException" );
}
catch(Exception ex)
{
  Console.WritLine("Some Exception" );
}
finally
{
  Console.WriteLine("This Finally Line gets executed always");
}
Console.WriteLine("Result is {0}",val);
}
}

Protected Internal  Array  Sort Array  Throw  Multiple Catch  Polymorphism  Inheritance  Session Viewstate  Autogenerate  ReadOnly  Sealed Class  Sealed Method  Multiple Interfaces  Overloading  Overloaded Constructors  Generics  Main  Case Sensitive  Console  Specifier  Return Type  SetCommandLineArgs  System Environment  New  Default Values of Types Compiler Error Constant Variable Const Const - ReadOnly Parameter Modifier Out Ref Interface Interface Reference, is, as System.Collection

More Interview Questions...
Skip Navigation Links
Interview questions on Design Patterns in .NET
ASP.NET Ajax Interview Questions
Interview questions related to security
C# Interview Questions
ASP.NET Interview Questions
Interview Questions in ASP.NET 2.0
Articles at dotnetuncle.com
Skip Navigation Links
OOPs questions in .NET
Questions on .NET Framework
ADO.NET Interview Questions
Short Answer questions in .NET
Frequently asked differences in .NET
Important commonly used Acronyms in .NET
MS SQL, Oracle SQL Interview Questions



    
Dotnetuncle's Tip:

  A field is essentially a member of a struct or a class. A field can have the following modifiers: public, internal, private, protected, static, new, unsafe, readonly, volatile