• Top Posts

    What is the difference between finally and finalize block in C#?

    • 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.


    No comments

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728