What is the difference between “dispose” and “finalize” variables in C#?
1831
20-Nov-2017
Manish Kumar
20-Nov-2017Dispose - This Dispose method uses interface – “IDisposable” interface it is used tol free up both managed and unmanaged codes like – database connection, files etc.
Finalize - This Finalize method is called internally unlike Dispose method which is called explicitly. It is called by garbage collector and can’t be called from the code.