public class TestClass { protected internal int FieldA; internal protected int FieldB; }
受保护的内部成员和内部成员之间是否存在差异?
解决方法
Is there a difference between
protected internal
andinternal protected
members?
它们之间没有区别.
受保护的内部意味着保护或内部
内部保护意味着内部或受保护.
The type or member can be accessed by any code in the assembly in
which it is declared,or from within a derived class in another
assembly. Access from another assembly must take place within a class
declaration that derives from the class in which the protected
internal element is declared,and it must take place through an
instance of the derived class type.
在这两者中,通常使用受保护的内部. MSDN page about Access Modifiers上没有对内部保护的引用.
另请参阅Phil Haack的博客文章What Does Protected Internal Mean?