May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Sub LambdasBack in Visual Basic 2008, lambda expressions were represented only by functions that could return a value and that were realized via the Function keyword, as shown at the beginning of this section. Visual Basic 2010 also introduces a new feature, known as Sub lambdas that C# developers know as anonymous methods. This new feature allows using the Sub keyword instead of the Function one so that you can write lambda expressions that do not return a value. The following code demonstrates this:

The preceding code iterates a List(Of String) collection and sends to the console window the result of the iteration. A Sub lambda is used because ...
Read now
Unlock full access