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
How to block a class from being inherited further?
Why do we use classes?
How garbage collection deals with circular references.
What is xor operator in c#?
What is using keyword?
Are c# tuples immutable?
What are the differences between a class and a struct?
Is there a way to force garbage collection?
What are methods in C#?
What is assembly version series sequence?
What do you mean by delegates and explain different types of delegates?
What are the advantages of constructor?
Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?
What is dependency in software?
What is the difference between method parameters and method arguments. Give an example?