Preventing methods from being inherited
问题 I have a base class Foo that is concrete and contains 30 methods which are relevant to its subclasses. Now I've come across a situation that is specific only to the base class,and I want to create a method that cannot be inherited, is this possible? Class Foo { /* ... inheritable methods ... */ /* non-inheritable method */ public bool FooSpecificMethod() { return true; } } Class Bar : Foo { /* Bar specific methods */ } var bar = new Bar(); bar.FooSpecificMethod(); /* is there any way to get