摘要:
View Code 1 Bitmap map = new Bitmap(200,80); 2 Graphics g = Graphics.FromImage(map); 3 g.Clear(Color.White); 4 Random r = new Random(); 5 string codestr = null; 6 for (int i = 0; i < 4; i++) 7 { 8 st... 阅读全文
摘要:
如有一接口IUser,继承该接口的两个类分别为SqlserverUser和AccessUser(它们之间的关系是抽象工厂模式)而到底引用哪个类是通过db变量来决定,if(db=Sqlserver)则实例SqlserverUser反之易然 简单模式View Code 1 class Data 2 { 3 private static readonly string db = "Sqlserver";//或Access 4 public static IUser CreateUser() 5 { 6 IUser result... 阅读全文