J
Jamie Risk
Two classes:
public class _A {
public int Value1;
public int Value2;
public _A(int v1, int v2) {
this.Value1 = v1;
this.Value2 = v2;
}
}
public class _B : _A {
public int Value3;
public _B(_A a, v3) : base(a.Value1, a.Value2) {
this.Value3 = v3;
}
}
Is there a way I can create a constructor for _B without have to
break apart the elements of the _A typed argument when calling
the base constructor?
public class _A {
public int Value1;
public int Value2;
public _A(int v1, int v2) {
this.Value1 = v1;
this.Value2 = v2;
}
}
public class _B : _A {
public int Value3;
public _B(_A a, v3) : base(a.Value1, a.Value2) {
this.Value3 = v3;
}
}
Is there a way I can create a constructor for _B without have to
break apart the elements of the _A typed argument when calling
the base constructor?