we have the classes:
class A
{
}
class B:A
{
public void metod(){}
}
and
static class C
{
static void met(B clas)
{
A test = clas as B;
// is it any way to get method "metod " from B via test?
}
}
I know that this look like nonsense but the idea is right, I cannot make B object in C class.
Child can access parent through
base. For e.g.because when inheriting child knows who parent is and that parent class becomes base
but there is no keyword like
childbecause base does not know which class will inherit it.A child can have a single parent but a parent can have one or more child.