in Technology by

What is the difference between dispose() and finalize() methods in C#?

1 Answer

0 votes
by

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.


Related questions

0 votes
    What is the difference between the dispose and finalize methods in C#?...
asked Mar 31, 2021 in Technology by JackTerrance
0 votes
    Mention what is the difference between the "residual payment" and "partial payment" methods of allocating cash in account receivable?...
asked Jan 5, 2021 in Technology by JackTerrance
0 votes
    What is the difference between del() and remove() methods of list?...
asked Nov 26, 2020 in Technology by JackTerrance
0 votes
    Can Someone Please tell me the difference between list methods append() and extend() in Python? Select the correct answer from above options...
asked Jan 20, 2022 in Education by JackTerrance
0 votes
    The two ways of entering a cell reference in a formula are a) by typing and b) by pointing.Explain the ... between the two methods Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    The two ways of entering a cell reference in a formula are a) by typing and b) by pointing.Explain the ... between the two methods Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    The two ways of entering a cell reference in a formula are a) by typing and b) by pointing.Explain the ... between the two methods Select the correct answer from above options...
asked Dec 18, 2021 in Education by JackTerrance
0 votes
    What is the difference between method overloading and method overriding in C#?...
asked Jul 27, 2021 in Technology by JackTerrance
0 votes
    What is the difference between abstract class and interface in C#?...
asked Jul 27, 2021 in Technology by JackTerrance
0 votes
    What is the difference between const and readonly in C#?...
asked Jan 16, 2021 in Technology by JackTerrance
0 votes
    What is the difference between String and string in C#?...
asked Jan 15, 2021 in Technology by JackTerrance
0 votes
    What is the difference between late binding and early binding in C#?...
asked Mar 31, 2021 in Education by JackTerrance
0 votes
    What is the difference between boxing and unboxing in C#?...
asked Mar 31, 2021 in Education by JackTerrance
0 votes
    What is the difference between String and StringBuilder in C#?...
asked Mar 31, 2021 in Education by JackTerrance
0 votes
    Which of these is a method of ObjectOutput interface used to finalize the output state so that any buffers ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
...