Categories

May 6 in C Sharp (C#)
Q: What is the difference between dispose() and finalize() methods in C#?

1 Answer

May 6
The dispose() method is explicitly called by user to free unmanaged resources such as files, database connections etc whereas finalize() method is implicitly called by garbage collector to free unmanaged resources like files, database connections etc.

The dispose() method belongs to IDisposable interface whereas finalize() method belongs the Object class.
Click here to read more about C Sharp
Click here to read more about Insurance

Related questions

Madanswer
Oct 18, 2019 in C Sharp (C#)
Feb 16 in C Sharp (C#)
Oct 18, 2019 in C Sharp (C#)
...