internal protected property still accessible from a different assembly

前端 未结 8 968
清酒与你
清酒与你 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-07 10:36

    Basically, it doesn't seem to work like that.

    See - http://msdn.microsoft.com/en-us/library/ba0a1yw2(VS.80).aspx

    protected internal acts as an OR - access is restricted to derived classes or to the current assembly.

提交回复
热议问题