Q:

Distinguish between finally and finalize blocks?

0

Distinguish between finally and finalize blocks?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

finally block is called after the execution of try and catch blocks, It is used for exception handling whether or not the exception has been caught this block of code gets executed. Generally, this block of code has a cleaner code.

The finalize method is called just before the garbage collection. Main priorities are to perform clean up operation for unmanaged code, it is automatically invoked when an instance is not subsequently called.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Interview Questions and Answers,You Need To Know

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is Boxing and Unboxing in C#?... >>
<< What is Thread Pooling?...