Comparison of Visual Basic and Visual Basic .NET
Visual Basic .NET was released by Microsoft in 2002 as a successor to the original Visual Basic computer programming language. It was implemented on the .NET Framework 1.0. The main new feature was managed code. Programmers familiar only with Visual Basic would probably have encountered difficulties working with the new version or adapting existing programs for it. Obvious major differences The new platform bore little resemblance to its predecessor. While programmers expected to be able to recompile their Visual Basic source to a .NET target, the reality of the situation was that Visual Basic .NET was a vastly different paradigm. Obvious syntax differences aside, Visual Basic .NET provides much the same functionality as C# (since they both compile down to MSIL, with the most obvious difference being the case insensitivity of Visual Basic .NET, maintaining the original case-insensitivity of Visual Basic), which is more of a problem for C# programmers trying to inter-operate with Visual Basic .NET developers than anything else. The basic syntax remains very similar: conditions, loops, procedures, sub-routines are declared and written in the same manner (see Visual Basic). Mobility from prior Visual Basic iterations to Visual Basic .NET really are parts of existing code: programmers with experience in both worlds are required to effectively target the new platform with older logic. The Visual Basic .NET developer will have to learn the use of the basic .NET types rather than what they have been used to in Visual Basic. A programmer who has only worked with Visual Basic may encounter a steep learning curve to migrate to Visual Basic .NET. A programmer who is versed in another language or who has had exposure to the .NET runtime should be able to cope. It would be better to think of Visual Basic .NET as a new language inspired by the classic Visual Basic rather than as a continuation of Visual Basic 6.0, with the added difficulty for migrating programmers that VB.NET interfaces with the .NET Framework whereas VB6 was based on the Component Object Model (COM). More detailed comparison There are some immediate changes that developers should take note of: More C-like syntax Visual Basic .NET allows for the +=, -=, *=, /=, \=, ^=, and &= compound operators so that longer lines like: variable = variable + 1 can now be written as: variable += 1 However, increment and decrement operators are not supported. Short-circuited logic In prior iterations of Visual Basic, all statements in a condition would have been evaluated even if the outcome of the condition could be determined before evaluating a condition. For example: If foo() And bar() Then ' code here is executed if foo() and bar() both return True, however, if foo() returns False, bar() is still evaluated End If This was not only inefficient, but could lead to unexpected results for any person used to another language. In Visual Basic .NET, the new AndAlso and OrElse operators have been added to provide short-circuit evaluation like many other languages. Explicit pointer-like types