IDisposable interface is used to release the unmanaged resources in a program.
The garbage collector has no knowledge of unmanaged resources
such as window handles, or open files and streams.
To release these type of resources we make use of the Dispose method by implementing the IDisposable interface.
IDisposable interface, defines a single method named Dispose():
public interface IDisposable
Asked In: Many Interviews |