下列范例示范使用基底类别初始设定式。
The following example demonstrates using the base class initializer.
在衍生类别中覆写时,会传回指定之方法的初始设定式。
When overridden in a derived class, returns an initializer for the specified method.
当您使用物件初始设定式来建立具名型别的执行个体时,会呼叫类别的预设建构函式,接著按照您指定的顺序初始化指定的成员。
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.
应用推荐