我只是想在.net core c#中设置一个小例子程序,但总是遇到setter和getter的问题
public int wheels {
get { return wheels;}
set { wheels = value + 10; }
}
发生了异常。 未处理的类型' System.StackOverflowException'发生在core_app.dll
我的意思是,这就是你使用它的方式,对吧?我刚写的时候;得到;它没有任何问题。