VB vs. Visual Basic .NET

Here are some important differences between VB and Visual Basic .NET that you need to know about.

Dino Esposito

March 26, 2002

1 Min Read
ITPro Today logo

The incompatibilities between Visual Basic (VB) and Visual Basic .NET include the following:

  • Visual Basic .NET requires you to use parentheses when calling a method.

  • Arguments in Visual Basic .NET default to ByVal when passed across subroutines and functions.

  • In Visual Basic .NET, Wend and Static are no longer valid keywords.

  • Data typing is much stronger and the size of some VB data types is different in Visual Basic .NET. The typical example is the Integer type, which has been enlarged to 32 bits instead of 16.

  • In Visual Basic .NET, exception handling is allowed through Try/Catch statements instead of On Error/GoTo statements.

  • VB's user-defined data types (UDTs) have been replaced by structures, so in Visual Basic .NET, you have to use Structure/End Structure instead of Type/End Type.

Also, the two languages handle classes somewhat differently. In Visual Basic .NET, you code classes in files with a .vb extension instead of a .cls extension. Any class module can contain more than one class and is declared with a new syntax, Class/End Class, that resembles the VBScript syntax rather than that of VB 6.0.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like