Cannot access protected member in base class [duplicate]
问题 This question already has an answer here: What's the real reason for preventing protected member access through a base/sibling class? 6 answers Consider you have the following code: public abstract class MenuItem { protected string m_Title; protected int m_Level; protected MenuItem m_ParentItem; public event ChooseEventHandler m_Click; protected MenuItem(string i_Title, int i_Level, MenuItem i_ParentItem) { m_Title = i_Title; m_Level = i_Level; m_ParentItem = i_ParentItem; } } and public