C#匿名方法
Func<string, string> test = delegate(string s) { return s + "end"; }; Console.WriteLine(test("llllll")); Func<string, string> test1 = param => { return "start" + param; }; Console.WriteLine(test1("llllll")); Action<string> test2 = delegate(string s) { Console.WriteLine(s); }; test2("test2"); Action<string> test3 = s => { Console.WriteLine(s); }; test2("test3");