The new features of VB .NET for VS2010 - Community Credit Forums
in

    Community Credit Forums

The new features of VB .NET for VS2010

Last post Fri, Jan 2 2009 11:11 AM by LouVega. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • Mon, Nov 3 2008 11:08 AM

    • svickn
    • Top 25 Contributor
    • Joined on Thu, Oct 2 2008
    • Baton Rouge, LA
    • Posts 71

    The new features of VB .NET for VS2010

    I found this article in my google reader today:

    http://blogs.msdn.com/vbteam/archive/2008/11/02/vb-2010-unveiled-at-pdc-2008-lisa-feigenbaum.aspx

    it goes over some of the new features in VB for VS2010. Personally, I'm excited about the continuation of making VB a great laid back but powerful development environment. What do you guys think about the changes?

    From the article:

    • Collection Initializers. Initialize collections in fewer lines of code! Use the "From" keyword followed by a list, rather than successive calls to the Add method.
      • Dim y As New List(Of String) From {"hello", "world"} 
      • Dim x As New Dictionary(Of String, Integer) From {{"hello", 1}, {"world", 2}}
    • Array literals. Express arrays more concisely. Whereas before you used to have to write New Integer() {1,2,3}, now you can just write {1,2,3}. Leave it to the compiler to infer the type of the items in the array! This can be very convenient wherever you use arrays.
      • 2D array: {{1,0},{0,1}}
      • Jagged array: {({1,2,3,4}),({1,2})}
    • Statement lambdas. Visual Basic 2008 enabled lambda expressions. Now you can write multi-line lambda subs or functions as well!
      • Define a Sub or Function anywhere a delegate is expected.
    • Auto-implemented properties. Eliminate 8 out of 9 of the lines you write for boiler-plate VB properties today!
      • Expanded property syntax:
            Private m_Id As Integer
            Public Property Id() As Integer
                Get
                    Return m_Id
                End Get
                Set(ByVal value As Integer)
                    m_Id = value
                End Set
            End Property
      • Auto-property syntax, new in VB 2010:
            Public Property Id() As Integer
      • Auto-property syntax, with an initializer:
            Public Property Id() As Integer = 100
    • Removal of the line continuation character. Underscores are no longer needed in the most common line continuation scenarios. Can you believe it?!?!
      • Attributes, argument lists, parameter lists, queries, and binary operators are some of the most common scenarios for an underscore. In VB 2010, you can now write these lines underscore-free!
      • What are we to do with all those unused underscores? Check out http://www.unemployedunderscores.com
    • Generic co- and contra- variance. Code that used to generate errors will now work error-free! See Lucian Wischik's blog posts on this new feature, which has been enabled by CLR 4.0.
    • No PIA. Deploy your Office applications without the bulky primary interop assemblies! VB 2010 will embed the Office types your application depends on, right into the app itself. No more need to deploy large PIAs.
    • Interop with dynamic languages. VB 2010 offers improved support to interoperate with dynamic languages. Dynamic and static languages each have their own benefits, libraries, and particular scenarios for which they are better suited. With VB 2010, you no longer need to choose just one! You can use dynamic languages directly from VB.Net as needed.
  • Fri, Dec 19 2008 2:10 PM In reply to

    • LouVega
    • Top 10 Contributor
    • Joined on Thu, Sep 14 2006
    • South Carolina, United States
    • Posts 818
    • Moderator
      MVP

    Re: The new features of VB .NET for VS2010

    Saw a talk on this at MDC Atlanta - quite happy to know of these changes :)

    Filed under: ,
  • Mon, Dec 22 2008 3:14 PM In reply to

    • svickn
    • Top 25 Contributor
    • Joined on Thu, Oct 2 2008
    • Baton Rouge, LA
    • Posts 71

    Re: The new features of VB .NET for VS2010

    How was the MDC? The nearest one was over 5 hours away, and I couldn't justify it at the time. Would've liked the Windows 7 bits :|

  • Fri, Jan 2 2009 11:11 AM In reply to

    • LouVega
    • Top 10 Contributor
    • Joined on Thu, Sep 14 2006
    • South Carolina, United States
    • Posts 818
    • Moderator
      MVP

    Re: The new features of VB .NET for VS2010

    The MDC in Atlanta was great! Glad I went!

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems