New Features


Compared to the dizzying array of features necessitated by the move to .NET, the list of other new features in Visual Basic .NET is relatively modest. In general, we focused on addressing a few complaints about missing features and useful semantics. Among the things added that fall into this category are the following:

  • Short-circuiting Boolean operators AndAlso and OrElse . Because the current And and Or operators cannot short-circuit (because they are used as binary operators as well as logical operators), we added two new logical operators that will short-circuit. Although it was possible to work around their absence, short-circuiting logical operators quickly became indispensable in practice.

  • Initializers. Initializers on locals are mainly a typing convenience, but initializers on class-level data members are very handy as they obviate the need for defining a constructor in many cases.

  • Compound operators. Again, these operators are mostly a typing convenience, allowing you to say "x += 1" instead of "x = x + 1".



Programming in the .NET Environment
Programming in the .NET Environment
ISBN: 0201770180
EAN: 2147483647
Year: 2002
Pages: 146

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net