Dealing with .NET IDisposable objects

后端 未结 12 759
自闭症患者
自闭症患者 2021-01-30 13:14

I work in C#, and I\'ve been pretty lax about using using blocks to declare objects that implement IDisposable, which you\'re apparently always suppose

12条回答
  •  隐瞒了意图╮
    2021-01-30 13:49

    Like Fxcop (to which they're related), the code analysis tools in VS (if you have one of the higher-up editions) will find these cases too.

提交回复
热议问题