Skip navigation

VB vs. Visual Basic .NET

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.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.