garbage collector is responisble to allocate and de-allocate the memory space for managed resources.although garbage collector is able to track the lifetime of an object that encapsulates an unmanaged resources ,but it does not have specific knowledge about how to clean up the unmanaged resources.So to clean up the unmanaged resouces we need to use Dispose() or Finalize().
when a Close() method is called, any managed resource can be temporarily closed and can be opened once again. It means that, with the same object the resource can be reopened or used
Dispose method is explicitly called by the programmer to free up unmanaged resources,like file handles,database collections.The class implementing Dispose method should implement IDisposable Interface.
Finalize method is implicitly called by the garbage collector to clean up the unmanaged resources by the garbage collector.Finalize method can automatically called by the Garbage collector.But Dispose method can be called by using custom code written by the programmer.To implement the Finalize method we need to use Destructor Syntax.(~)tilde symbol.
Deepak, if this helps please login to Mark As Answer. | Alert Moderator