YEEEEEEEEEEEEHA
the spelling checker didn’t like that one), here are some of the new features in VB 10.
And yes, I did sound happy there, because some of these features are really not optional but much needed. Like the multi-line lambda and the sub lambda.
You can find the whole video on Channel9
Multi-line lambdas will look like this
- myfunction.lambdathing(Function(e) e.dosomething
- e.dosomethingelse
- End Function)
Or like this
- myfunction.lambdathing(Sub() dosomething
- dosomethingelse
- End Sub)
Now this will also be possible. And I’m very happy about that.
- myfunction.lambdathing(Sub() dosomething)
They will also support auto properties and collection initializers, neither of which I really needed.
I’m so happy, I think I will stick with VB for a while. Although all the catching up to C# thing is annoying. I just hope it doesn’t become a VS 2011 or later version. Let’s make it a VS 2010 that came out in 2009 version shall we?
And here is some other stuff that should be possible.
- Private Sub SomeMethod()
- Dim _counter as Integer = 1
- AddHandler Button1.Click, Sub()
- _counter += 1
- TextBox1.text = _counter
- End Sub
- Private Sub SomeMethodRunningInAnotherThread()
- Me.Dispatcher.Invoke(Normal, Sub()
- ‘Do some other stuff
- SomeTextBox.Text = "Test"
- End Sub)
- End Sub
Info found after some random surfing on StackOverflow
