110,538
社区成员
发帖
与我相关
我的任务
分享
using (X x = new X())
{
GC.SuppressFinalize(x);
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace WindowsFormsApplication13
{
public partial class Form1 : Form
{
class X : IDisposable
{
~X()
{
MessageBox.Show("类被回收...");
}
public void Dispose()
{
}
}
public Form1()
{
InitializeComponent();
using (X x = new X())
{
}
}
}
}