what is the difference between finally and dispose methods?

Answer Posted / sunil

finally will execute after the try block. It must execute
if there is any exception caught in the catch blobk or not.

Dispose method is the last method executed in the c# program

Is This Answer Correct ?    12 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is lazy loading and eager loading in c#?

478


What issues can be faced while delivering code?

1469


What is the max value of int32 in c#?

486


What does typeof return c#?

500


Explain how to implement an object pool in c#.net

517






Is c# or c++ better for games?

461


How to properly clean up excel interop objects?

498


Explain About disco and uddi

697


List some of the common data providers for ado.net framework?

450


What is serialization in c#?

468


What is the difference between add and addrange in c#?

491


In a C# class we have a SortedList member m_addinProjects we want to provide an iterator to allow the consumer of this class access to the items in the collection. Please provide an iterator method for the AnalyzeAddinsDLL class below and an example of how it would be used. namespace AnalyzeAddinsDLL { public class AllAddInProjects { private SortedList m_addinProjects; public AllAddInProjects() { m_addinProjects = new SortedList(); } } }

1809


Explain boxing and unboxing in c#?

501


What is a decimal c#?

465


What does == mean in c sharp?

508