答案是属性先被赋值。原因是为什么?
public ActionResult Test() { Person p=new Person(); return Json(5, JsonRequestBehavior.AllowGet); } public class Person { public string Id { get; set; } public int Name { get { return 200; } } public Person() { //调用构造函数时,Name的值已经是200了。 } }