What is Dispose method in .NET ?

Answer Posted / rajesh rajput

Is's a member of Idisposable interface provided by .net
framework.A class which implements this interface must
implement dispose(). that is responsible to remove
unmanaged resources from managed heap.

In this case, Garbage collector does not do anything as we
programmers handle the process of disposing the unmanaged
objects like DB objects etc.We should not infer that
garbage collector removes the objects which are no longer
in use in context of dispose only.

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the types of errors in c#?

485


Can constructor be protected in c#?

502


What is difference between yielding and sleeping?

452


what is method overloading in c#?

544


Why do we use readonly in c#?

493






Explain the difference between event and a delegate in c#?

534


What is the process of Serialization?

565


What is meant by unicode characters?

571


Define delegate?

546


What is session variable in c#?

563


What is the namespace for the thread class?

520


What is private and shared assembly?

550


What is writeline?

485


What is a multicast c# delegate?

518


Explain publishers and subscribers in events.

543