Question:What is finalizer?
Answer
Finalizers are class-only methods that execute before the garbage collector reclaims the memory for an unreferenced object. This is actually C# syntax for overriding Object’s Finalize method. The syntax for a finalizer is the name of the class prefixed with the ~ symbol:class Class1 { ~Class1(){...} }