Why do we need a finally block in try catch block while
handling exceptions
Answer Posted / vijay kumar inumella
finally block will be executed irrespective of whether
the exception occured or not.
finally block is generally used to close the database
connections and to dispose the session objects etc.
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
What does args mean in c#?
Are tuples immutable c#?
What does static mean in c sharp?
What sort algorithm does c# use?
Can multiple inheritance implemented in c# ?
How can I get around scope problems in a try/catch?
How to parse a date time string?
What is private variable?
what is the default access for a class
What is collection of classes in c#?
Explain the use of Mutex in C#?
Differentiate between object pooling and connection pooling in c#?
Define Abstract Class in C#
What does an indexer do?
Are c# destructors the same as c++ destructors?