If all code is written in a try block and write a catch
block with Exception type Exception .In that scenario will
all the exceptions catched by that catch block? or any
exceptions which will not be caught?
Answer Posted / pompana gouda
Yes and No is the answer...
Yes because, Any type of exception will be caught by general
catch block.
No because,
If there are 3 lines which generate 3 different exceptions,
Then only first exception is caught in the general exception
catch block. If first line is not throwing exception then
whatever the line which throws exception will be caught...
Not all exceptions are handled by single catch statement.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Is lazy thread safe c#?
What are the advantages of clr procedure over t-sql procedure?
What is the use of generics in c#?
How do I create a multilanguage?
How do you prevent a method from being overridden in c#?
What is difference between class and interface in c#?
Can mvc be used for desktop applications?
what is a constructor? What is a destructor?
Is c# an open source?
Which is better interface or abstract class in c#?
What is the difference between field and variable in c#?
What is the benefit of using interface in c#?
Which is faster iqueryable or ienumerable?
What is semaphore in c#?
What is console programming language?