Dispose,using
1.实现IDisposable 接口的类实现Dispose 方法;
2.using(ATest t=new ATest())
{
}
结束时自动调用Dispose();
相当于try{} catch{} ,catch调用Dispose();
开心
1.实现IDisposable 接口的类实现Dispose 方法;
2.using(ATest t=new ATest())
{
}
结束时自动调用Dispose();
相当于try{} catch{} ,catch调用Dispose();