{I+=codeWee;}
[C#] Action and Func Sample
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));
HTML | PHP | C++ | DirectX11 | Javascript | C# | HTML5 | ASP | SQL | General | CSS | Oculus Rift | Unity3d | Virtools SDK | Tip | NSIS | PowerShell | node.js | Web API | RTSP | All
Copyright© 2016 CodeWee.com All rights reserved.