Language Changes in Visual Basic .NET - dummies

By Nitin Pandey, Yesh Singhal, Mridula Parihar

Part of Visual Studio .NET All-in-One Cheat Sheet

Visual Basic .NET (part of the Visual Studio .NET suite) incorporates a number of language changes for database programmers — whether you are experienced or a beginner. Here’s a quick look at some of the changes:

  • Variable declaration changes: In Visual Basic .NET, you can declare multiple variables in a single line without specifying the type of each variable.

  • Array changes:

    • By default, the lower bound of an array is 0, which can’t be modified.

    • You can’t create fixed-sized arrays in Visual Basic .NET.

    • You can’t use the ReDim statement for declaring arrays for the first time. You can use this statement only for resizing an array.

  • Data type changes:

    • Visual Basic .NET doesn’t support the Currency data type. Instead, the Decimal data type can be used to store currency values.

    • In Visual Basic 6.0, a date was stored in the Double data type. However, Visual Basic .NET provides the DateTime data type to store the values in the date format.

    • In Visual Basic 6.0, the Variant data type is used to store data of any type. In Visual Basic .NET, the Object data type is used to store data of any type.

  • Logical operator changes: In Visual Basic 6.0 you use And, Or, Not, and Xor to perform the logical and bitwise operations. In Visual Basic .NET, however, And, Or, Not, and Xor can perform only logical operations. To perform bitwise operations, you use BitAnd, BitOr, BitNot, and BitXor operators.