class X {
sealed protected virtual void F() {
Console.WriteLine(\"X.F\");
}
sealed void F1();
protected virtual void F2() {
Console.W
Well, sealed keyword prevents method from being overriden, and that's why it doesn't make sence
virtual
instead of declaring virtual sealed
.So the only option is override sealed
which means override, but the last time:
public class A {
public virtual void SomeMethod() {;}
public virtual void SomeOtherMethod() {;}
}
public class B: A {
// Do not override this method any more
public override sealed void SomeMethod() {;}
public override void SomeOtherMethod() {;}
}
public class C: B {
// You can't override SomeMethod, since it declared as "sealed" in the base class
// public override void SomeMethod() {;}
// But you can override SomeOtherMethod() if you want
public override void SomeOtherMethod() {;}
}