advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

What's New in Visual Basic 9.0? Part 1

The release of Visual Studio 2008 updates Visual Basic to version 9.0, with several key language enhancements and LINQ support. Part one of this series will walk you through using nullable types, type inference, the If operator, and other time-saving enhancements.  


advertisement
ith the release of Visual Studio 2008, Microsoft has also updated the VB language to its latest version, 9.0. In VB 9.0, there are several key language enhancements that have been made to support the new Language Integrated Query (LINQ) feature announced earlier by Microsoft. This article will walk you through each of these new language enhancements and provide a couple of code examples to illustrate their uses.

Nullable Type
As you are no doubt aware, all un-initialized value types in VB have a default value when they are declared. For example, the following declaration declares a Boolean variable:


Dim married As Boolean
Because it has not been initialized, married now contains the default value of False. However, there are times where you do not know the marital status of a person and hence the variable should neither be True nor False. In VB 9.0, you can now declare value types to be nullable, i.e., they do not yet have a value.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement