Why is internal protected not more restrictive than internal?

后端 未结 8 2136
陌清茗
陌清茗 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 04:58

    It's effectively protected or internal, not and. It's accessible both by derived classes and types in the same assembly. It's a common misconception to think protected internal means accessible only to derived classes in the same assembly.

提交回复
热议问题