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
Are arrays immutable c#?
What is the extension of c# file?
In which format you can pass the value in the sleep function?
What is array and its types in c#?
What is the purpose of escape sequence?
What is unsigned int?
What's the difference between an integer and int?
Why reflection is used in c#?
what will be the output of the given below coding. using System; public class Exercise { static void OddNumbers(int a) { if (a >= 1) { Console.Write("{0}, ", a); a -= 2; OddNumbers(a); } } public static int Main() { const int Number = 9; Console.WriteLine("Odd Numbers"); OddNumbers(Number); Console.WriteLine(); return 0; } }
What is the use of console readkey in c#?
Can a string be null c#?
Why do we still see so much non-oo code written in c# today?
What is a void c#?
What is the base class of all classes in c#?
What is Covariance and contravariance in C#?