I think you can and my colleage thinks you cannot!
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You can't even declare private virtual methods. The only time it would make any sense at all would be if you had:
... that's the only scenario in which a type has access to its parent's private members. However, this is still prohibited:
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.
You won't fund your private method in your derivative class. So the virtual keyword has no sens in this case.