Why is internal protected not more restrictive than internal?

后端 未结 8 2133
陌清茗
陌清茗 2020-12-08 04:33

I\'d like to create an internal auto-property:

internal bool IP { get; protected internal set; }

I thought it would be possible to make the

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 05:13

    protected internal means visible to classes in the same assembly, or to classes deriving from the containing class - in other words it is visible to those meeting the internal requirements OR the protected requirements, not AND. There is no access modifier meaning protected AND internal in this way.

提交回复
热议问题