class Program { static void Main(string[] args) { string mid = ",mid"; Action<string> anonDel = delegate (string param) { param += mid; param += " and this."; Console.WriteLine(param); }; anonDel += delegate (string t) { Console.WriteLine(t + System.Guid.NewGuid().ToString()); }; anonDel("www.webczw.com"); Console.ReadKey(); } }
时间: 2024-12-20 17:26:48