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

Why should you override the tostring() method?

598


Is stringbuilder faster than string concatenation c#?

447


Is list ienumerable c#?

608


Is c# an open source language?

550


Can we set image Source dynamically using C# in WPF application?

636






What are destructors in C#?

849


How can you use abstract class and interface?

544


What is the difference between null and string empty in c#?

464


Why generics are used?

497


Explain About .Net remoting

567


Why do we need constructor?

492


Does c# support c type macros?

557


How does a while loop work?

481


What is void in c#?

532


Explain about multithreading?

556