in Dot Net by
Q:

What is the difference between finally and finalize block

► Click here to show 1 Answer

0 votes
by

finally block is called after the execution of try and catch block. It is used for exception handling. Regardless of whether an exception is caught or not, this block of code will be executed. Usually, this block will have clean-up code.

finalize method is called just before garbage collection. It is used to perform clean up operations of Unmanaged code. It is automatically called when a given instance is not subsequently called.

Loan/Mortgage
Learn More with Madanswer

Related questions

+1 vote
asked Jun 25, 2019 in Dot Net by Venkatshastri
...