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

Answers were Sorted based on User's Feedback



Why do we need a finally block in try catch block while handling exceptions..

Answer / 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

Why do we need a finally block in try catch block while handling exceptions..

Answer / 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

Why do we need a finally block in try catch block while handling exceptions..

Answer / santosh

The code which should execute at any cost even when an exception occurs that code should be written in finally block
ex-closing a form when exception occurs.

Is This Answer Correct ?    2 Yes 2 No

Why do we need a finally block in try catch block while handling exceptions..

Answer / amit

when we need to forcefully executed the code even any
exception will occurs.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Name some properties of thread class.

0 Answers  


What is Bubble Event ?

2 Answers   HCL,


What is difference between method overriding and method overloading?

0 Answers  


What does the keyword virtual mean in the method definition?

3 Answers   Ipog Software, Satyam, Visual Soft,


What is class sortedlist underneath?

0 Answers  


Name which controls do not have events?

0 Answers  


Explain the term inheritance in C#.

0 Answers   Deloitte, JPMorgan Chase,


7.What are typed data set?

2 Answers   Ebix, Mphasis,


Where do you add an event handler ?

1 Answers  


What is COM Interoperability?

0 Answers   DELL,


Can we return two values from a function?

12 Answers   MD Synergy,


Is it possible to nest cfml conditional tags?

0 Answers   HCL,


Categories