439 training reviews
20 years in business
Call us on: 01457 858 877
Visual Basic 2010 has some good new features, the most exciting ones (our opinion) of which are shown below. You might also like to look at the list of new features in Visual Studio 2010 and ASP.NET 4.0 changes.
Specific new or changed features in Visual Basic 2010 include:
When you select a keyword in VB code, Visual Studio now highlights all other keywords forming part of the same construct:
You no longer have to use the underscore continuation character at the end of a broken line:
You've been able to hold down the ALT key while selecting code for some time, to select a rectangular block of text. However, you can now type into the selected block, which may (as in the diagram below) be zero characters wide. This allows you to insert the same text into a number of lines of code simultaneously - marvelllous!
How often have you created properties like the one called Owl2 below? Now you can do it in one line of code - for the Owl1 property below the private variable _Owl1 is automatically created for you, although not shown:
To speed up coding, you can automatically create a property in one class while writing another. Choosing the option below would automatically create an Author property in the clsTest class.
If you know the elements in a collection, you can create it in a single line of code (the example shown here, however, shows doing the same thing to create an array). Microsoft seem enthusiastic about this change, but it doesn't save much coding and doesn't make code clearer to read.
You can view a full list of changes in recent versions of Visual Basic by returning to our main Visual Basic version history page.