c# base class and virtual functions

Started by
1 comment, last by TheTroll 13 years, 9 months ago
Lets say I have the following situation

class A{  protected virtual void some_function()  {     }}class B: A{  protected override void some_function()  {  }}class C: B{}


now I want to prevent class C from overriding some_function. How can I prevent this?
Advertisement
The sealed modifier should do exactly what you want [smile]

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Use "sealed" on the method you do not want overridden.

theTroll

This topic is closed to new replies.

Advertisement