How to limit subclassing of public abstact class to types in same assembly and thus allow protected members typed to internal types
问题 This question is similar to c# internal abstract class, how to hide usage outside but my motiviation is different. Here is the scenario I started with the following: internal class InternalTypeA {...} public class PublicClass { private readonly InternalTypeA _fieldA; ... } The above compiles fine. But then I decided that I should extract a base class and tried to write the following: public abstract class PublicBaseClass { protected readonly InternalTypeA _fieldA; ... } And thus the problem,