ReSharper:除了使用注释外,还有其他方法来抑制警告吗?

ReSharper:除了使用注释外,还有其他方法来抑制警告吗?,resharper,resharper-8.0,Resharper,Resharper 8.0,我得到了ReSharper警告,我想在这个特殊的情况下抑制它(但不是整个项目)。目前唯一的办法就是用评论来压制它。但是它看起来很丑 // ReSharper disable StaticFieldInGenericType private static int count; // ReSharper restore StaticFieldInGenericType 我只是不喜欢在我的代码中看到这些重竖琴注释 是否有可能将这些设置保存在单独的文件中,例如-superssedins

我得到了ReSharper警告,我想在这个特殊的情况下抑制它(但不是整个项目)。目前唯一的办法就是用评论来压制它。但是它看起来很丑

// ReSharper disable StaticFieldInGenericType
        private static int count;
// ReSharper restore StaticFieldInGenericType
我只是不喜欢在我的代码中看到这些重竖琴注释


是否有可能将这些设置保存在单独的文件中,例如-
superssedinspections.ReSharper
等?

否,您只能在注释中禁用它。您最好使用ReSharper 8的简洁单行版本:

// ReSharper disable once StaticFieldInGenericType

谢谢@citizenmart。ReSharper是否有一个uservoice页面,我可以在其中提出建议?不,我们使用我们自己的问题追踪器-狗食!您可以在以下位置报告错误或提出建议: