It appears that VB in VS8 doesn\'t support/convert lambda expressions with a statement body. I\'m using them in my C# application, but now must convert it to VB.
I\'m c
Wait for the nearest release of .NET 4, it will support things like this in VB. Don't see other alternative.
Ugly alternatives are:
This work, but you can use a single statement in a function.
AddHandler Me.Click, Function(o, e) MessageBox.Show("text")
Create some regular Sub Foo
Public Sub Foo(ByVal o As Object, ByVal e As EventArgs)
MessageBox.Show("text")
End Sub
and use AddHandler
to bind it to an event
AddHandler Me.Click, AddressOf Foo
Could you make a new class that accepts the Form
in the constructor and has chkSelectPanel
as a field, allowing you to use instance methods as your event handlers?