Difference between Dispose & Finalize Method

COMPARISON BASISDISPOSE( )FINALIZE( )
DefinedThe method dispose( ) is defined in the interface IDisposable interface.The method finalize( ) id defined in java.lang.object class.
Syntaxpublic void Dispose( ){
// Dispose code here
}
protected void finalize( ){
// finalization code here
}
InvokedThe method dispose( ) is invoked by the user.The method finalize( ) is invoked by the garbage collector.
PurposeMethod dispose( ) is used to free unmanaged resources whenever it is invoked.Method finalize( ) is used to free unmanaged resources before the object is destroyed.
ImplementationThe method dispose( ) is to be implemented whenever there is a close( ) method.The method finalize( ) is to be implemented for unmanaged resources.
Access specifierThe method dispose( ) is declared as public.The method finalize( ) is declared as private.
ActionThe method dispose( ) is faster and instantly disposes an object.The method finalize is slower as compared to dispose
PerformanceThe method disposes( ) performs the instantaneous action hence, does not effect the performance of websites.The method finalize( ) being slower affects the performance of the websites.