force the GC to invoke Finalize() for finalizable objects created in this AppDomain.

image_pdfimage_print
   
 

using System;
using System.Collections.Generic;
using System.Text;

public class MyResourceWrapper {
    ~MyResourceWrapper() {
        Console.Beep();
    }
}
class Program {
    static void Main(string[] args) {
        MyResourceWrapper rw = new MyResourceWrapper();
    }
}