Understanding Lambda Expressions
Lambda expressions, another language feature introduced with .NET Framework 3.5, provide you with an extremely terse way of defining methods.
Imagine, for example, that you want to programmatically wire up a Click
event handler to a button control. Listing 20.6 is an example of one way of doing this.
Listing 20.6. LanguageChanges\NormalMethod.aspx
In Listing 20.6, the Page_Init()
method associates the Button Click
event with the btn_Click()
method. When you click the button, the btn_Click()
method executes and ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.