overriding protected internal with protected!

后端 未结 3 1572
逝去的感伤
逝去的感伤 2020-12-08 07:08

This is an extension for this question asked an hour ago.

We cannot modify the access modifiers, when overriding a virtual method

3条回答
  •  再見小時候
    2020-12-08 08:02

    Because, while the terminology is different, overriding it as protected keeps the visibility of the member the same. If you were allowed to override it as protected internal, then you would suddenly be exposing the member to any other type in your assembly.

提交回复
热议问题