创建对象代码如下:
new FilterInfo(Student.CreateTimeProperty,"朱七",Express.Equals,Relationship.Or) { Field = Student.CreateTimeProperty, Value = "朱6", Express = Express.Equals, Relationship = Relationship.Or }
而在FilterInfo的定义中属性public Relationship Relationship{get;set;}=Relationship.And;
经过分步调试,发现该对象的属性值:Value值是"朱6",而Relationship的值是 Relationship.Or。
得出:创建对象时首先执行属性、字段等的初始化代码,,其次执行构造函数代码,再其次执行对象初始化器的代码。