Can Resharper be set to warn if IDisposable not handled correctly?

前端 未结 5 1495
醉话见心
醉话见心 2020-12-01 18:00

Is there a setting in Resharper 4 (or even Visual Studio itself...) that forces a warning if I forget to wrap code in a using block, or ommit the proper Dispose

5条回答
  •  孤街浪徒
    2020-12-01 18:31

    You might want to look at FXCop for this: http://msdn.microsoft.com/en-us/library/ms182328(VS.80).aspx

    Its a pity R# doesn't handle it, even if just a warning for fields in your class and/or variables you create.

提交回复
热议问题