Why do we use .NET properties instead of plain old get/set functions?

前端 未结 15 1750
自闭症患者
自闭症患者 2020-12-25 15:06

I understand the many benefits of providing an interface to access the members of a class indirectly. My question is: isn\'t that already something you can accomplish in jus

15条回答
  •  失恋的感觉
    2020-12-25 15:09

    Maybe a minor point, but with getters /setters I find it annoying that when I'm cycling through them in an IDE with 'intellisense' there's a massive block of 'getters' next to each other and another block of 'setters'. I find it more difficult to find what I'm looking.

提交回复
热议问题