属性被赋值和构造函数谁先执行

答案是属性先被赋值。原因是为什么?

 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了。
            
        }
    }
原文地址:https://www.cnblogs.com/Benjamin/p/3225978.html