What is the use of giving more than one CATCH BLOCK in one
TRY block? Directly we can give that catch(Exception e)?Why
we go for arrayoutofbound Exception,divided by zero etc..?
Explain
Answer Posted / kavitha
try with single catch block will catch what ever the
exception thrown by the code inside the try block but it
will not be clear..some time a code in a try block can throw
different type of exception.To catch the different type of
exception what our code throws we can use difference type
of catch for the single try block it will be more clear and
help full.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is Named parameter in C#?
What is the difference between dictionary and hashtable in c#?
What is the data encapsulation?
What is form feed and carriage return?
Why do we need constructor?
Is string a data type in c#?
What is the use of xmlserializer?
Is stringbuilder thread safe c#?
Is post back in c#?
What is the symbol used for in c#?
What is the difference between selection and projection?
The int maps to which C# keyword in .NET type?
Can we set image Source dynamically using C# in WPF application?
Is var a data type?
What is the use of command builder?