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

前端 未结 17 2144
猫巷女王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:58

    We're using ReSharper which manages all of that very well. Most of the time we remove 'this' unless keeping it in a constructor since we typically use constructor parameters with the same name.

提交回复
热议问题