I know that when inheriting classes, you can also inherit Constructors
example:
class Book : Genre
{
Book(string param1, int param2, string inherit1, string inherit2) : Base(inherit1,inherit2)
{
Prop1 = param1
Prop2 = param2
}
}
But wouldn't it just be easier to set the inherited properties via the constructor in the inherited class. Instead of referencing the base constructor?
class Book : Genre
{
Book(string param1, int param2, string inherit1, string inherit2)
{
Prop1 = param1
Prop2 = param2
InhProp3 = inherit1
InhProp4 = inherit2
}
}