Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Desktop Developer

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

Search

XML Feeds

Google Ads

« .NET Framework 4 Poster In PDF and DeepZoom FormatsThe new features in C# 4.0 »
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

YEEEEEEEEEEEEHA :D 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

  1. myfunction.lambdathing(Function(e) e.dosomething
  2.                                    e.dosomethingelse
  3.                        End Function)

Or like this

  1. myfunction.lambdathing(Sub() dosomething
  2.                              dosomethingelse
  3.                        End Sub)

Now this will also be possible. And I’m very happy about that.

  1. 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.

  1. Private Sub SomeMethod()
  2.      Dim _counter as Integer = 1
  3.      AddHandler Button1.Click, Sub()
  4.                                       _counter += 1
  5.                                       TextBox1.text = _counter
  6.                                   End Sub
  1. Private Sub SomeMethodRunningInAnotherThread()
  2.      Me.Dispatcher.Invoke(Normal, Sub()
  3.                                       ‘Do some other stuff
  4.                                       SomeTextBox.Text = "Test"
  5.                                   End Sub)
  6.  End Sub

Info found after some random surfing on StackOverflow

About the Author

User bio imageChristiaan is a forensic technician who programs on the side, although my function description says that I do IT-things for 90% of the time . I'm an avid VB.NET fan and I use lots of the ALT.Net techniques, like unit-testing, nhibernate, logging, IoC, ...
Social SitingsTwitterLinkedInHomePageLTD RSS Feed
1098 views
happy, vb.net
submit to reddit Digg!FacebookDotnetkicks

Comments and Feedback

4 comments

Comment from: thatrickguy [Member] Email
***--
Single line properties = good
simple Parallelization method = good
inferred types = dumb
reintroduction of the varient = emotionally upsetting.

I like that they are trying to reduce code, but some of that crap is a combination of bad ideas and maintenance nightmares.

-Rick
30/10/08 @ 07:48
Comment from: Alex Ullrich [Member] Email
****-
"reintroduction of the varient = emotionally upsetting."

Totally
30/10/08 @ 08:30
Comment from: David Nelson [Visitor] · http://www.commongenius.com
No one is reintroducing Variant. Variant has no type; the new VB features are about inferring types instead of having to explicitly (and often redundantly) state them. But the types are still there.
21/11/08 @ 14:58
Comment from: Thanigainathan.S [Visitor] Email · http://thaniguy.blogspot.com
****-
Hi ,

Thia article is really nice. Thanks for sharing such a nice thing about VB.NET.

Thanks
22/11/08 @ 05:11

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)