Do you use 'this' in front of instance variables?

前端 未结 17 2137
猫巷女王i
猫巷女王i 2020-12-19 01:08

When accessing instance variables or properties of a class from within the class itself, do you prepend them with \"this.\"?

17条回答
  •  天涯浪人
    2020-12-19 01:46

    No, but then I write a lot of VB ;)

    About the only time I'll check this/Me is when I don't remember the exact name of the member or when I need to distinguish it with a function parameter of the same name.

提交回复
热议问题