Sometimes it can be confusing reading code in instance members that refers to other instance members of the same class (or a base class):
public void MyMethod()
{
Where = did + AllTheseWeirdThings(GetDeclared()); // ?
}
Having a coding standard something like "prefix all private/protected members with "_" doesn't help, because instance members can still refer to public members.
It would be much better to read this:
public void MyMethod()
{
this.Where = this.did + base.AllTheseWeirdThings(this.GetDeclared()); // ?
}
Is there a way to enforce this, either with compiler options, StyleCop, or something similar?