Can you override private virtual methods?

前端 未结 3 1462
失恋的感觉
失恋的感觉 2021-02-15 00:43

I think you can and my colleage thinks you cannot!

3条回答
  •  失恋的感觉
    2021-02-15 01:00

    Your colleague is right. You can't declare private virtual methods because there's no point (since there'd be no way to override them)...

    But you can override protected virtual methods.

提交回复
热议问题