警告未使用的using语句的静态分析规则是什么? [英] What is the static analysis rule to warn about unused using statements?
本文介绍了警告未使用的using语句的静态分析规则是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当文件中的任何对象都不再使用了using语句时,是否有任何FxCop或StyleCop警告?
Is there any FxCop or StyleCop that warns when there is an using statement that is no longer referenced by any object in the file?
推荐答案
您可以启用规则 IDE0005 C#使用指令。
类别 Style
中。
You can enable the rule IDE0005 C# Using directive is unnecessary.
in the category Style
.
这篇关于警告未使用的using语句的静态分析规则是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文