Re:Mono 3.2.7 is out
by ntnj on Wednesday February 26, 2014 @02:22PM
(#7306986)
Unused parameter for lambda function.
[ Parent
| on HN ]
Re:Mono 3.2.7 is out
by SideburnsOfDoom on Wednesday February 26, 2014 @02:40PM
(#7307110)
This is the most accurate reply. The expression
Get["/"] = _ => "Hello World!";
is actually of the form a = b;Where "a", i.e. "Get["/"]" is an array-like property (http://msdn.microsoft.com/en-us/library/2549tw02.aspx ) and the "b" value assigned to it is an anonymous function with one parameter, i.e.
_ => "Hello World!"
In Nancy these handlers are of the type Func<dynamic, dynamic> ( http://msdn.microsoft.com/en-us/library/bb549151(v=vs.110).a... ) The parameter could be given any legal name, but an underscore is a convention meaning "I am not using this param".