【发布时间】:2013-02-21 17:06:50
【问题描述】:
每次我尝试运行我的代码时,都会收到错误消息:“由于 StackOverFlowException,进程已终止”。当我查看警告时,我在我的属性上得到了它,上面写着“确保你没有无限循环或无限递归”。这是我的代码:
class Book
{
public string bokensTittle
{
get { return bokensTittle; }
set { bokensTittle = value; }
}
public string forfattareFornamn
{
get {return forfattareFornamn;}
set {forfattareFornamn = value;} // on this line i get the error
}
public string forfattareEfternamn
{
get {return forfattareEfternamn;}
set {forfattareEfternamn = value;;}
}
public int lanseringsDatum
{
get { return lanseringsDatum; }
set { lanseringsDatum = value; }
}
}
谁能帮我解决这个问题?
【问题讨论】:
标签: c#