//使用非靜態方法 public static void RunSample(string race, string move) { DelegateSample_Animal animal = new DelegateSample_Animal(race); StrProc desc = new StrProc(animal.Move); desc(move); }
//使用靜態(Static)方法 public static void RunSample() { StrProc unknownDesc = new StrProc(DelegateSample_Unknown.Commit); unknownDesc("Don't know"); }