摘要:
斐波那契数列使用 var zero2 = new Febonacci(); var num = zero2.Shell(10); Debug.WriteLine(num); zero2.Main(14); zero2.Febon(155); 斐波那契数列 public class Febonacci 阅读全文
摘要:
public class SelectionSort { public static int[] Sort(int[] array) { int[] copyArray = new int[array.Length]; Array.Copy(array, copyArray, array.Lengt 阅读全文
摘要:
public interface IMouseFactory { Mouse createMouse(); } public class HpMouseFactory : IMouseFactory { public Mouse createMouse() { return new HpMouse( 阅读全文
摘要:
设计模式 解耦 重用 设计模式原则: 开闭原则 OPEN CLOSE PRINCIPLE 开闭原则是面向对象设计中最基础的设计原则 对扩展开放,对修改关闭 依赖倒置原则 具体实现应该依赖于抽象 高模块不应该依赖低模块,都依赖抽象 public interface IDriver{ public vo 阅读全文