Tag: 这款

C#StyleCop – 对于像当前类成员这样的基类成员使用“this。”前缀?

StyleCop有一个关于使用“this”的规则。 调用类成员的前缀(SA1101)。 这个规则是否适用于从其基类inheritance的类的成员(例如方法)。 例: class BaseClass { protected void F1() { … } } class ChildClass : BaseClass { protected void F2() { … } protected void F3() { this.F2(); // This is correct acording to SA1101 // F1 is a member of base class and if I dont put this prefix, stylecop will not […]