I just want make sure I'm doing and thinking right about inheritance and constructors if I have more than one sub class. My classes looks like this, Shape is the base class and the other derived classes
Shape<-----Shape2D<------Box
Is this code correct? it's working, but I'm just wondering if this is the best way?
public Shape(int inputA, int inputB)
{
valueA = inputA;
valueB = inputB;
}
public Shape2D(int inputA, int inputB) : base(inputA, inputB)
{
}
public Box(int inputA, int inputB) : base(inputA, inputB)
{
}