MSDN Blog Postings

via RSS Feed

VB.NET 10 : Multiline Lambdas

Posted by on November 8th, 2009

With implicit line continuation VB.NET 10 now allows you to write the multiline Lambdas. That means like your normal Functions you can write functions under Lambdas. So now you may write like, Dim arrInt As Integer () = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 } Dim myFinc = Array .FindAll(arrInt, Function (n) If n Mod 2 = 0 Then Console .WriteLine( “{0} is Even” , n) Else Console .WriteLine( “{0} is not Even” , n) End If End Function ) Namoskar!!!…(read more)
This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.