July 2015
Intermediate to advanced
1300 pages
87h 27m
English
So far you have seen lambda expressions that were represented only by functions that could return a value and that were realized via the Function keyword. You can also use Sub lambdas that C# developers know as anonymous methods. This feature lets you use 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:
Dim collection As New List(Of String) From {"Alessandro", "Del Sole", alessandro.delsole@visual-basic.it"}collection.ForEach(Sub(element) Console.WriteLine(element))
The preceding code iterates a List(Of String) collection and sends ...