相关疑难解决方法(0)

在内部使用属性有什么好处?

当从类外部访问成员时,封装显然是有用且必不可少的,但是当在内部引用类变量时,调用其私有成员或使用其getter更好吗?如果你的getter只是返回变量,那么性能是否存在差异

c# getter performance encapsulation properties

5
推荐指数
2
解决办法
722
查看次数

标签 统计

c# ×1

encapsulation ×1

getter ×1

performance ×1

properties ×1