这种情况多出现在函数无限递归调用中
public bool GetResult(int id)
{
return GetResult(id);
}
public class Program
{
private string name;
/*********************************************************************/
public string Name { get { return Name; } set { Name = value; } }
/*********************************************************************/
/*应改为:public string Name { get { return name; } set { name = value; } }*/
public Program(string name)
{
this.name = name;
}
public void Show()
{
Console.WriteLine(Name);
}
}
new Program("hello").Show();