DevX
 

MS Restores VB6 Functionality to VB.NET


On April 5 Microsoft announced that it's making changes to Visual Basic.NET to make it more compatible with VB6. Details on the changes, outlined below, will be presented at VBITS in Chicago and New York as well as VSLive! Orlando.

While VB.NET includes many features developers have long requested, including inheritance, better threading, and structured error handling, the new features come at the price of changes to VB's core syntax.

Given the tremendous pressure felt throughout Microsoft to ship .NET Framework and Visual Studio.NET, making fundamental changes at this point is a significant concession to core VB users.

These changes will all be implemented in the Visual Studio.NET Beta 2, Ari Bixhorn, Microsoft Visual Basic Product Manager, informed VBITS and VBPJ. Changes include:

  • The Value of True: In VB6, when True is coerced to a signed integer, the result is -1. For consistency with other .NET languages, VB.NET was going to change the value of True to 1. Instead, it will be left at -1. Note that when a True value is passed from VB.NET to other .NET languages, it will be passed as 1.
  • Behavior of Boolean Operators: Microsoft intended to change And, Or, Not, and XOr to logical-instead of bitwise-operators, with new operators taking over bitwise duties. These have been restored to their previous functionality, both logical and bitwise, as has operator precedence. In addition, a planned short-circuiting capability has been removed from these operators, and has been reassigned to new operators: AndAlso and OrElse.
  • Declaring Arrays: For consistency with other languages, Microsoft intended to change the way VB declared arrays, so that you would specify the number of elements in the array: Dim a(10) As Integer would create a ten-element array, with an upper bound of 9. This conflicts with the VB style of declaring arrays, where Dim a(10) As Integer creates an eleven-element array with an upper bound of 10. The traditional declaration technique has been restored.

Says Bixhorn, "These changes are really for [developers] maintaining an existing code base and doing new development. They want consistency. They don't want to have to look at a line of code and have to remember whether it's correct for .NET or VB6."

According to Bill Vaughn, President of Beta V Corporation and a keynote speaker at this month's VBITS Chicago, "Microsoft is delivering a very powerful toolset in Visual Basic.NET. By responding to feedback from the Visual Basic community, they will provide a more seamless transition from programming in VB6 to Visual Basic.NET."




  Copyright 2001, DevX.com, Inc.




 Resources
VB Zone

.NET Guide

VBPJ Magazine

VBITS

VSLive!

• "Microsoft redrawing Visual Studio.Net"

The "Official Word" Discussion

VB.NET Discussions


  TALK BACK
How welcome are the changes to you? Do they go too far, not far enough, or are they just right? Tell us in the .NET discussion group.

Sponsored Links

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map
Jupiterweb networks

internet.comearthweb.comDevx.comClickZ

Search Jupiterweb:

Jupitermedia Corporation has four divisions:
JupiterWeb, JupiterResearch, JupiterEvents, and JupiterImages

Copyright 2004 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Jupitermedia Corporate Info | Newsletters | Tech Jobs | E-mail Offers