What is Dispose method in .NET ?

Answer Posted / neerajtyagi

Whenever you want to release unusable resources used by
your class automatically , you should implement IDisposable
interface in your class.

Implementing IDisposable will provide you Dispose method in
subclass, where you can code your own to release unused
resources.

Is This Answer Correct ?    7 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between float and integer?

809


What are the properties of c#?

704


How can it prevents DLL Hell assembly versioning in .NET?

778


Explain About Virtual functions and their use.

792


Can you put two constructor with the same structure in a class?

713


What is c# best for?

723


Can a constructor have a return type?

697


How can we set class to be inherited, but prevent the method from being over-ridden?

793


What are the different types of constructors?

735


If the interface in c# only contains the declaration of the methods and we need to define those methods in the class, then why we use the interface?

791


Can we change static value in c#?

757


What is integer c#?

695


Explain the difference between abstract class and interface.

882


What's the difference between a method and a procedure?

704


How do switch statements work?

694