How do I call the constructor of a parent class?
If I have something like
All of the tutorials i've found only talk about inheriting a class.
15 Replies
Public child() : base(“mom”, “dad”)
so base works as the parent class's constructor?
this seems like a weird thing to represent with inheritance
base call the parent constructor
yes
thank you!
As the parent in general. You can use ‘base.ParentMethod()’ for e.g. just check the docs on keyword
quick question wouldn't this make a second child class inside the first?
What makes you say that?
so
Parent
Child
Child
nop
unless you have static
ehh
it's only one class
yes
that's the constructor for child