May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Visual Basic 2010 now provides support for multiline lambda expressions, a feature that was already available in Visual C#. Basically there is now the ability to write complete anonymous delegates within a line of code, as demonstrated in the following snippet:

In this particular case the compiler can infer the System.Func(Of Double, Double) result type because the n argument is of type Double. Within the method body you can perform required evaluations, and you can also explicitly specify the return type (take a look at the first lambda example) to get control over the System.Func result. Another example is for multiline lambdas ...
Read now
Unlock full access