开发者

Should I use «this.» keyword in OOP programing where it's possible to skip it? Any benifits of using it? [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

开发者_如何学JAVA 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.

My questions:

  1. Should we try always to use this.?

  2. Does using / writing this have any effect on application performance or does it just make the code a little bit clearer?


There shouldn't be any difference in performance. Its purely a style decision.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜