In one of my previous posts I have mentioned about writing Lambda expressions in C# 3.0.That post dealt with only C# and it was fine at that time as I was coding in C# only.Now the things changed and my project is in VB.Net.I struggled a lot to convert the C# code into VB.Net which contains lambda expressions.Here I am just describing how to write Lambda expressions in VB.Net
Here is the normal code which displays a message box on a button click.
Equivalent Lambda expression
Very simple and neat.Isn't it?
One more scenario of Anonymous delegates
Hope the above code is clear.
We can use the same in the case of async service calls too.
The only one sad thing is VB.Net doesn't support multi line lambda expressions where C# does