E
E
el-bekasto2020-05-30 21:40:09
OOP
el-bekasto, 2020-05-30 21:40:09

Multiple inheritance of classes from one class in C#?

I watched a lesson where class inheritance was explained.

class A
    {
    }

    class B : A
    {
    }

    class C : B
    {
    }

this entry is theoretically correct, that is, if you want to inherit several classes at once from one class
class A
    {
    }

    class B : A
    {
    }

    class C : A
    {
    }

but is this notation correct? Well, if elements of class B are not needed, for example. The compiler does not give an error, it seems to work fine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-05-30
@el-bekasto

Yes, that's also possible

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question