C# Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 390 Page Views: 

In one Try block what is the need of multiple Catch Blocks?



Posted By: Avi Date: 1 October 2010 11:35:31 AM
 Answer:

If there is one catch block in the try block then it will catch every exception but it will not be clear what kind if exception is it. So to make things clear and helpful multiple catch bllocks are included for different exceptions in a single try block and only relevant exception will be picked up when there is any.


Posted By: avibtech


Date: 1 October 2010 11:35:31 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image PfqsZP
Related Questions
C# : Does c# supports optional arguments?

Does c# supports optional arguments?

Yes, from version 4.0
Category: C# Date: 10/13/2010 10:03:47 AM
C# : How do you prevent property from being serialized?

How do you prevent property from being serialized?

by marking it with [NonSerialized()] attribute
Category: C# Date: 10/13/2010 9:10:46 AM
C# : What is meant by MulticastDeligate?

What is meant by MulticastDeligate?

MulticastDeligate is a special class.It is a deligate that can have more than one element in its inv....
Category: C# Date: 10/1/2010 11:54:31 AM
C# : Write a code to convert string to integer (int) data type.

Write a code to convert string to integer (int) data type.

class conver { public static void Main() { String a = "2000"; int x = Convert.ToInt32(a)....
Category: C# Date: 10/1/2010 11:53:31 AM
C# : Is it possible to override a private virtual method?

Is it possible to override a private virtual method?

The naswer is no. Also Virtual or abstract methods can not have private as access modifier. Also pri....
Category: C# Date: 10/1/2010 11:52:31 AM