当您使用物件初始设定式来建立具名型别的执行个体时,会呼叫类别的预设建构函式,接著按照您指定的顺序初始化指定的成员。
When you use an object initializer to create an instance of a named type, the default constructor for the class is called, followed by initialization of designated members in the order you specify.
分类是在建立时预设为单一执行个体,而在加入另一个执行个体时变为多个执行个体。
By default, a category is single-instance when it is created and becomes multi-instance when another instance is added.
应用推荐