Implementing the Template Method pattern in C#
问题 The template method pattern provides that the abstract base class has a not overridable method: this method implements the common algorithm and should not overridden in the subclasses. In Java the template method is declared final within the abstract base class, in C# the sealed keyword has a similar meaning, but a not overridden method can not be declared sealed . public abstract class Base { protected abstract AlgorithmStep1(); protected abstract AlgorithmStep2(); public sealed void