问题
Possible Duplicate:
When do you use the “this” keyword?
In OOP sometimes we can write this.PropertyName = VALUE and sometimes we can skip this. and just write PropertyName = VALUE.
So my question is, should we try always to use this.?
Does using / writing this have any effect on application performance or does it just make the code a little bit clearer?
Thanks.
回答1:
There shouldn't be any difference in performance. Its purely a style decision.
来源:https://stackoverflow.com/questions/3920279/should-i-use-this-keyword-in-oop-programing-where-its-possible-to-skip-it-a