Possible Duplicate:
When do you use the “this” keyword?
I'm writing some of my first C# code, and I notice that this.foo
is only necessary when there is a local name foo
different from the this.foo
. I have so far been inconsistent as to whether or not I use this
.
Is it preferred to always use this
or is it preferred to only use this
when necessary?