我们有一个编码标准,说明必须使用类名调用所有共享(静态)字段和方法.例如. NameOfClass.whatever 而不是 whatever 我们可以使用一种工具来检查这种情况吗? (同样适用于模块) 对不起,我应该
          NameOfClass.whatever
而不是
whatever
我们可以使用一种工具来检查这种情况吗?
(同样适用于模块)
对不起,我应该更清楚一点,我们正在使用VB.NET.
这是我的意思的一个更大的例子.
Public Class Class1
    Public Shared Sub SharedMethod()
    End Sub
    Public Shared sharedField As Integer
    Public Sub NotSharedMethod()
        'this next line shold be written as Class1.SharedMethod
        SharedMethod()
        'this next line shold be written as Class1.sharedField
        sharedField = 5
    End Sub
End Class 
 另见What StyleCop like tools are there for VB.NET
是,使用StyleCop并编写自定义规则以进行检查.
这是StyleCop的reference to check how to write custom-rule.
