static void Main01(string[] args) { //First int x = 59; GetString gs = default(GetString); gs += (x.ToString); Console.WriteLine(gs.Invoke()); Console.WriteLine(); //CallBack Test01 Test01("Hello", PrintInformation01); Console.WriteLine(); //CallBack Test02 callback += PrintInformation01; callback += PrintInformation02; Test02("World", true); }
static void Test01(string str, MethodRunOver callback01) { Console.WriteLine(str); callback01.Invoke(); }