什么时候应该使用"使用"在C#块?什么时候、QUOT

由网友(执念虐心)分享简介:有没有我应该在哪里(或不应该?)使用使用块特定的实例:使用(SOMETYPE T =新SOMETYPE()){...}解决方案 在 SOMETYPE 类实现IDisposable.Are there particular instances where I should (or shouldn't?) be usin...

有没有我应该在哪里(或不应该?)使用使用块特定的实例:

 使用(SOMETYPE T =新SOMETYPE()){
    ...
}
 

解决方案

SOMETYPE 类实现IDisposable.

不用去排队啦 养老保险补缴费,可以这样做

Are there particular instances where I should (or shouldn't?) be using "using" blocks:

using(SomeType t = new SomeType()){
    ...
}

解决方案

When the SomeType class implements IDisposable.

阅读全文

相关推荐

最新文章