internal protected property still accessible from a different assembly

前端 未结 8 969
清酒与你
清酒与你 2021-02-07 09:40

I\'m setting up some demo code for a beginner session on accessibility and I found that I am able to access an internal protected property from a derived class. What am I missin

8条回答
  •  既然无缘
    2021-02-07 10:22

    By combining the protected and internal keywords, a class member can be marked protected internal — only derived types or types within the same assembly can access that member.

    This MSDN article answers all your questions.

提交回复
热议问题