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.

Discuss this Article 1

Pradip Kumar Maiti (not verified)
on Jun 18, 2004
Very good

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottOur Experts will show you:
• Common SQL Server
Problems
• Best Practices for T-SQL
• SQL Server Integration
Services
• Database Development

Come See Michael Otey & Tim Ford in Person!

Early Registration Now Open

From the Blogs
May 21, 2013
blog

A Common Misconception about MAXDOP

Out of the box, SQL Server is (and has been) able to take advantage of multiple processors/cores without any effort on behalf of administrators....More
May 9, 2013
blog

My ISO 8601-Compliant Signature 2

My family recently just "officially" announced that we're in the process of adopting a child from South Africa. We're quite excited, of course, but there's a ton of paperwork to do—along with the need for gobs of signatures....More
May 8, 2013
blog

Use SSIS for ETL from Hadoop

In this blog post, Mark Kromer walks you through using SSIS as a way to use ETL techniques using Microsoft's Hadoop on Windows (HDInsight) as a source using Hive connectors...More
SQL Server Pro Forums

Get answers to questions, share tips, and engage with the SQL Server community in our Forums.