Internal abstract class: how to hide usage outside assembly?

后端 未结 7 1063
再見小時候
再見小時候 2020-12-05 01:30

I have a common assembly/project that has an abstract base class, then several derived classes that I want to make public to other assemblies.

I don\'t want the abs

相关标签:
7条回答
  • 2020-12-05 02:26

    The abstract base class has to be public, as the entire inheritance heirarchy for a class has to be visible. This ensures the polymorphism works and is valid; however all the base classes' members can be internal (including the constructor), and hence not usable outside your assembly

    0 讨论(0)
提交回复
热议问题