Joh*_*ohn 1 c# oop recursion class
我可以像这样定义构造函数吗?附加问题:我可以在构造函数中调用类的构造函数吗?
class SubArray
{
List<int> array;
string parent;
string name;
SubArray child;
public SubArray(SubArray child, string name)
{
this.child = child;
List<int> array = new List<int>();
this.name = name;
}
}
Run Code Online (Sandbox Code Playgroud)