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

Is null in c#?

686


Which config file has all the supported channels/protocol?

779


What is reflection in c#?

704


Why do we use delegates?

662


How does bitwise work?

725


What happens if a static constructor throws an exception?

747


What is the compiler of c#?

748


Explain polymorphism in c# with a simple example?

725


Why do we use inheritance in c#?

714


Why is c# good for games?

751


What are access modifiers in c#?

779


Why do we use abstract class in c#?

787


What is desktop example?

732


What is the difference between virtual and override in c#?

774


Explain how to use an extender provider in the project.

746