在我的基类中,其他人继承的基类具有以下属性:
private int DEFAULT_DISPLAY_ORDER = 999999;
private DateTime DEFAULT_DT = new DateTime(1111,1,1);
public int? Id {
get
{
return Id.GetValueOrDefault(0);
}
set
{
if (DisplayOrder == null) DisplayOrder = DEFAULT_DISPLAY_ORDER;
Id = value;
}
}
public String Description { get; set; }
public int? DisplayOrder { get; set; }
但是当我执行它时,我得到了这个错误:
+ $exception {
Cannot evaluate expression because the current thread is in a stack
overflow state.}
System.Exception {System.StackOverflowException}
在线的
if (DisplayOrder == null) DisplayOrder = DEFAULT_DISPLAY_ORDER;
这到底是怎么回事?