仍然使用UsedImplicitlyAttribute显示Resharper警告

时间:2011-04-05 20:05:55

标签: c# resharper warnings

Resharper警告我一个没有被调用的私有方法。它是通过反射调用的,所以我不想删除该方法,并且(部分地)为此目的设计了UsedImplicitlyAttribute。但即使在用该属性修饰方法之后,resharper仍然警告我。这似乎是一个错误,但是我想错过一些选项(resharper并没有那么少)。有谁知道如何解决这个问题?建设项目不起作用。谢谢。

1 个答案:

答案 0 :(得分:2)

我假设您已阅读the documentation on how to incorporate the Code Annotations items into your own code。我在过去发现R#可以是 little 片状的这部分选项:

R# options page

在您复制声明的命名空间出现在列表中之前,有时需要多次访问此页面。但是一旦它完成,你勾选复选框,它应该都可以工作。