Answer the question
In order to leave comments, you need to log in
Initializing an object by base class?
Please tell me how to implement such a constructor:
Class Derived : BaseClass
{
public Derived(BaseClass bc)
{
// Как быть дальше???
}
}
Answer the question
In order to leave comments, you need to log in
Class Derived : BaseClass
{
public Derived(BaseClass bc) : base (bc.x, bc.y, bc.z) // и т.д. и т.п
{
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question