class X {
sealed protected virtual void F() {
Console.WriteLine("X.F");
}
sealed void F1();
protected virtual void F2() {
Console.WriteLine("X.F2");
}
}
In the above code there is compile time error :
X.F()' cannot be sealed because it is not an override
X.F1()' cannot be sealed because it is not an override
Does it mean we can only apply the sealed
keyword whey we have to override some methods?