When accessing instance variables or properties of a class from within the class itself, do you prepend them with \"this.\"?
In C#, I absolutely do. The primary reasons are:
Whether to do it or not is a stylistic issue. In spite of all the fighting that goes on, I don't believe there's an objectively better approach.
My source analysis tool (StyleCop)
defaults to requiring this. in
front of instance accesses. My
first point implies that I shouldn't
care much about whether I always do
or always don't, and because the
default StyleCop setting is to
always require it, I take the path
of least resistance/greatest
consistency and I follow the default
setting.
I follow this philosophy for most stylistic issues. I'm a huge fan of not changing default formatting options in an auto-formatting IDE. It just makes everyone's life harder over something that's really just not that important.