Export (0) Print
Expand All
Expand Minimize

Visual Basic 6.0 function was upgraded to a different Visual Basic .NET function

Visual Studio .NET 2003

When a Visual Basic 6.0 application is upgraded to Visual Basic .NET, some functions are upgraded to functions that, although they behave the same, have a different name.

For example, the Erase function for fixed-length arrays upgrades to System.Array.Clear:

' Visual Basic 6.0
Dim a(10) As Integer
Erase a

' After upgrade to Visual Basic .NET
Dim a(10) As Short
' UPGRADE_NOTE: Erase was upgraded to System.Array.Clear.
System.Array.Clear(a, 0, a.Length)
Note   In some cases, a variable has to be renamed because the original name conflicts with a reserved word. For example, a variable named Day will be renamed Day_Renamed; Day was not a reserved name in Visual Basic 6.0, but it is in Visual Basic .NET.

What to do next

  • No further action is necessary. This note was added to make you aware of the changes to your code, because the code looks significantly different.

See Also

Language Changes in Visual Basic

Show:
© 2014 Microsoft