摘要:
密封方法阻止继承类进一步的重写该方法。 public sealed override void Test() { //do it } http://msdn.microsoft.com/en-us/library/aa645769(VS.71).aspx 阅读全文
摘要:
The method overridden by an override declaration is known as the overridden base method. For an override method M declared in a class C, the overridden base method is determined by examining each base... 阅读全文
摘要:
1.静态工厂通过静态方法创建对象,但是不符合OCP Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 public class StaticFactory 2 3 { 4 5 public static Book Cr... 阅读全文