Why do we need a finally block in try catch block while
handling exceptions
Answer Posted / linto
For releasing unmanaged related objects from Garbage
collector.While,exception happen,the process flow may be
change.At that situation unmanaged objects like database
connection etc should be close.For that purpose we are
using finally block in try catch block.But,Idisposable is
better in the case of efficiency.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What does dbml stand for?
Explain types of comment in c# with examples
What is continue in c#?
What does console writeline do?
What is join in c#?
What is type safe in c#?
What you mean by inner exception in c#?
What is asax file in c#?
How do you inherit a class into other class in c#?
Explain namespaces in c#.
Explain about Oops concept
What is an assembly in dotnet?
Which language is used for desktop application?
How to reduce image resolution in C#?
how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.