I\'m just learning C# and MVC, and trying to understand some examples.
@Html.EditorFor(m => m)
Eventually I figured out that \'=>\' is the l
In your example, the lambda function doesn't serve any purpose, true. But its real use is for when you want to render the editor for a property of the model: @Html.EditorFor(m => m.SomeProperty). Lambda expressions are really just shorthand for functions, but strongly typed by way of delegates. The concept might be more familiar from Javascript:
myFunction( function(x) { return x.SomeProperty; });
The "m" isn't predefined. It's naming the parameter for the second part of the lambda expression, and could be anything: @Html.EditorFor( whatever => whatever ). (It refers to the same thing, in this case the page's model, regardless of what you name it.)
The first parameter you see in those definitions for Html.EditorFor isn't really a parameter. You'll notice they're using the this keyword to define extension methods. That parameter refers the the object that invoked the method, in this case the HtmlHelper