标签: c#
我创建了一个getter和setter方法,但是我仍然可以编辑变量而无需通过方法。
public string name {get; set;} Temp j = new Temp(); j.name = 10;
我仍然可以通过以下方式编辑名称:name = 10;
这正常吗?谢谢