摘要: 设计模式原则: 依赖于抽象进行设计,而不是具体的实现。工厂模式: 定义创建对象的接口,让其派生类去决定该创建什么类型的实例。示例代码:using System;usingSystem.Collections.Generic;using System.Linq;using System.Text;using System.IO;usingSystem.Security.Cryptography;namespace Hello{ //Pizza publicabstract class Pizza { protectedstring name; protectedstring dough; ... 阅读全文
posted @ 2011-09-28 10:11 Erebus_NET 阅读(104) 评论(0) 推荐(0) 编辑