I'm part of the team that's working on Visual Basic statement lambdas in Visual Studio 2010. In Visual Studio 2008, VB lambdas allowed programmers to write functions as expressions, e.g. as an argument to a method. In Visual Studio 2010, VB now allows you to write lambdas as statements (i.e. as a regular method body rather than just a single expression). It also allows expression lambdas without a return type.

Here's an example of the latter:

Module Module1
  Sub Main()

    Dim
q = Sub() Console.WriteLine("Hello World!")
     q()

  End Sub
End
Module

The expression is evaluated when the lambda is executed, but nothing is returned.

The real work in Visual Basic lambdas has been around 'statement lambdas'. This allows you to write full-fledged statements in lambdas:

Module Module1
  Sub Main()

    Dim
q = Sub(x As String)
                       Console.WriteLine(
"Hello"
)
                       Console.WriteLine(
"World!"
)
                       Console.WriteLine(x)
                End
Sub

    q("Hello World!"
)

  End Sub
End
Module

You can define variables inside lambdas, and even nest lambdas:

Module Module1
  Sub Main()
    Dim t As Integer = 22

    Dim q = Sub()
                       Dim s = Function(str As String
)
                                                Console.WriteLine(str)
                                                Return
0
                                   End
Function

                       s("Hello World!"
)
                 End
Sub

    q()

  End Sub
End
Module

In this case, lambda q() is invoked, which then invokes lambda s() with the argument "Hello World!". Note that the keywords 'Sub'/'Function' (and 'End Sub'/'End Function') can be used in an expression context, so you can use them as arguments (just like Function() expression lambdas in Visual Studio 2008):

Module Module
  Delegate Function SomeDelegate(ByVal x As Integer) As Integer

  Sub
Main()

  Dim
 q = New SomeDelegate(Function(x As Integer) As Integer
                                                     Return
x + 2
                                       End Function
)

  End Sub
End
Module

Hopefully this will make it easier to write small pieces of code for APIs that require procedures as arguments. Creating a regular method, which often appears out-of-place, will no longer be required for such API calls.