How to use Private Inheritence aka C++ in C# and Why not it is present in C#
- by Vijay
I know that private inheritance is supported in C++ and only public inheritance is supported in C#. I also came across an article which says that private inheritance usually defines a HAS-A relationship and kind of an aggregation relationship between the classes.
EDIT: C++ code for private inheritance:
The "Car has-a Engine" relationship can also…