Interviews2 answers
What is the difference between “dispose” and “finalize” variables in C#?
2 Answers
dispose releases unmanaged objects
while finalise releases all objects
Mukesh KumarPosted Sep 3, 2017, 12:31 AM EDT
Dispose - This method uses interface – “IDisposable” interface and it will free up both managed and unmanaged codes like – database connection, files etc.
Finalize - This 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.
Vivek KumarPosted Feb 8, 2016, 8:17 AM EST

