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-10-21 17:18:39