samedi 19 octobre 2019

Use a subset of methods as member methods in different classes in C#

Is it possible to use a subset of methods as member methods in different classes in C#?

For instance, I have four functions the void A(), the void B(), the void C() and the void D().

And now I want to have three classes. The first class I would like to have the member methods A, B and C. The second I would like to have the B and D. And the third the A, C and D.

How could I achieve this? Is it possible to achieve this only by using interfaces or are there any other approaches?

Aucun commentaire:

Enregistrer un commentaire