“public bool xy”和“public bool xy {get; set;}之间的区别

时间:2018-02-01 12:16:36

标签: c#

我对C#很陌生,这是一个我仍然无法理解的概念。

如果我将bool设置为公开,我可以写上它,并从中读取。为什么有必要向其添加{get; set;}

0 个答案:

没有答案