Visual Basic

Filed under: Reference Comments: 0

Depending on who you ask, VisualBasic.NET (VB.NET) is either the next iteration of VisualBasic 6.0, or is a complete replacement. The conflict arises from certain complaints VB6 programmers have made; namely, that their legacy code is severely broken (won't compile, or executes incorrectly) by changes made to the core of the language. These changes were necessary to implement VB in the .NET environment. First released in 2001 as part of the original offering of Microsoft's new .NET Framework, subsequent versions have addressed some of those complaints...

Advantages?

While it pains me to do so, I will admit that VB.NET does have some redeeming qualities. First and foremost, VB.NET code is much easier to read than most of its contemporaries. For this reason alone, I would recommend it as a starting point for beginning programmers.

Drawbacks?

My biggest beef with VB.NET (and BASIC in general) is that BASIC is a relatively weakly-typed language. What that means is that variable types are allowed to be somewhat ambiguous, and data can be passed between two or more variables that are not necessarily compatible. The main problem with THAT issue is that it is easy to truncate our data; if we take a floating point value from one variable and copy it to a single-precision variable, we have lost every number past the tenths place. Big deal? YES!! 3.1 is most certainly not the same as 3.1417 when you are doing area calculations for circular objects...

VisualBasic.NET Keywords

Here is a list of all VB.NET keywords as of .NET 3.5:

AddHandler AddressOf Alias And
AndAlso Ansi As Assembly
Auto Boolean ByRef Byte
ByVal Call Case Catch
CBool CByte CChar CDate
CDec CDbl Char CInt
Class CLng CObj Const
CShort CSng CStr CType
Date Decimal Declare Default
Delegate Dim DirectCast Do
Double Each Else ElseIf
End Enum Erase Error
Event Exit False Finally
For Friend Function Get
GetType GoSub GoTo Handles
If Implements Imports In
Inherits Integer Interface Is
Let Lib Like Long
Loop Me Mod Module
MustInherit MustOverride MyBase MyClass
Namespace New Next Not
Nothing NotInheritable NotOverridable Object
On Option Optional Or
OrElse Overloads Overridable Overrides
ParamArray Preserve Private Property
Protected Public RaiseEvent ReadOnly
ReDim REM RemoveHandler Resume
Return Select Set Shadows
Shared Short Single Static
Step Stop String Structure
Sub SyncLock Then Throw
To True Try TypeOf
Unicode Until Variant When
While With WithEvents WriteOnly
Xor #Const #ExternalSource #If...Then...#Else
#Region - & &=
* *= / /=
  = ^ ^=
+ += = -=

Source: Microsoft Developers Network