您可以编写一个自定义的的FxCop /代码分析规则,以检查这一点。
You could write a custom FxCop/ Code Analysis rule to check for this.
的FxCop集成在VS 2010名代码Analyis下,您可以更改规则集在项目属性。
FxCop is integrated in VS 2010 under the name "Code Analyis", you can change the ruleset in the project properties.