Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the classes contained in a single .NET DLL ?

874


What is byte c#?

785


Explain About CLS?

909


How many classes are there in classification?

937


How does yield return work c#?

874


Why is hashset faster?

910


What is delegate in c#?

897


What is a collection class in c#?

845


What is namespace give the example?

840


What is enum in c#?

904


What is difference between Enum and Struct?

945


What is web forms in c#?

866


Is it possible to inline assembly or il in c# code?

960


What is inumerable?

959


What are nested classes in c#?

902