using System.Drawing. class Tester { public static void Main() { using (Font theFont = new Font("Arial", 10.0f)) { //使用theFont对象 } // 编译器将调用Dispose处理theFont对象 Font anotherFont = new Font("Courier",12.0f). using (anotherFont) { // 使用anotherFont对象 } // 编译器将调用Dispose处理anotherFont对象 } }