It doesn't. That's an anonymous method which is a C#-only feature. That said, anonymous methods have basically been superseded by lambda expressions in C# and they are supported in VB too. VB 2008 only supports value lambdas, i.e. functions, and even then only a single line of code is allowed, so you can only do that in VB 2010. In VB, you use the AddHandler statement to attach a handler to an event. You need to specify the delegate to attach, which you usually do by specifying the AddressOf the method that will handle the event. In VB 2010 you can also use an action lambda, i.e. a subroutine.
vb.net Code:
AddHandler report.Error, Sub(innerSender As Object, eventArgs As ErrorEventArgs)
Me.ReportViewer.Report = Nothing
Me.Label1.Text = eventArgs.Exception.Message.ToString()
End Sub
You can in VB 2010 as well but in VB 2008 you would have no choice but to actually declare a regular named method and then use AddressOf to specify that as the event handler.
By the way, that use of ToString is pointless because the Message property of an exception is type String to begin with.