简单的问题,我该如何解决这个问题?C#的构造函数调用
public MyClass(string s)
{
int k = s.Length;
int l = SomeFunction(s);
int m = GetNumber();
if (Valid(l, m))
{
int p = SomeOtherFunction(k, m);
MyBigObject o = new MyBigObject(p);
// here I want to call the other constructor MyClass(o)
}
}
public MyClass(MyBigObject x)
{
this.o = x;
}
听起来像功课,我... – evilone