{I+=codeWee;} |
Action action = () => { Console.WriteLine("Action"); }; Action<string> action1 = (param) => { Console.WriteLine(param); }; Action<string, int> action2 = (param1, param2) => { Console.WriteLine("{0} : {1}", param1, param2); }; action(); action1("Hello"); action2("Hello", 2); Func<string> func1 = () => { return "func"; }; Func<int, string> func2 = (param) => { return param.ToString(); }; Console.WriteLine(func1()); Console.WriteLine(func2(10));