2
Reply

What is the difference between “dispose” and “finalize” variables in C#?

Vivek Kumar

Vivek Kumar

Feb 08, 2016
365
0

    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 Kumar
    February 08, 2016
    1

    dispose releases unmanaged objects while finalise releases all objects

    Mukesh Kumar
    September 03, 2017
    0