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

前端 未结 15 1808
自闭症患者
自闭症患者 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:32

    I know in some instances, you can use a property as a "Column" name like in a data set. I think .NET does this through introspection. I don't beleive this is possible with get/set functions.

提交回复
热议问题