我可以从C+中的另一个构造函数(做构造函数链)调用构造函数吗?
class Test {
public Test() {
DoSomething();
}
public Test(int count) : this() {
DoSomethingWithCount(count);
}
public Test(int count, string name) : this(count) {
DoSomethingWithName(name);
}}湖上湖
相关分类