+If the virtual method is marked `final`, it can't be overridden in derived classes. The overridden virtual method can be marked `final` using the [sealed](~/docs/csharp/language-reference/keywords/sealed.md) keyword in C#, [NotOverridable](~/docs/visual-basic/language-reference/modifiers/notoverridable.md) keyword in Visual Basic, or [sealed](/cpp/extensions/sealed-cpp-component-extensions) keyword in C++/CLI. The method can also be marked `final` implicitly by the compiler. For example, a method might be defined as non-virtual in your code, but it implements an interface method. The Common Language Runtime requires that all methods that implement interface members must be marked as `virtual`; therefore, the compiler marks the method `virtual final`.
0 commit comments