【发布时间】:2012-10-09 10:05:26
【问题描述】:
在 C# 中,通常当我定义一个属性时,我为 get 和 set 声明并实现一行或多行。例如
public bool IsThere
{
get { return _isThere; }
set { _isThere = value;}
}
现在这是什么意思?
public bool IsThere
{
get;
set;
}
【问题讨论】:
标签: c# properties automatic-properties