即使我们未替類 别设计任何的建构函式, 编译器仍会为類别定 义一个预设建构函式(Default Constructor), 也就是不需传递任何參數即可呼叫的建构函式 , 例如: 9 预设建构函式 10 预设建构函式 当我们宣告新的物件时, 这个预设建构函...
基于66个网页-相关网页
请注意,原始程序码中没有预设建构函式。
Notice that there is no default constructor in the source code.
空的建构函式宣告防止自动产生预设建构函式。
The declaration of the empty constructor prevents the automatic generation of a default constructor.
否则,新项目也可以透过其公用预设建构函式自动建立。
Otherwise, the new item is automatically created through its public default constructor.
应用推荐