Export (0) Print
Expand All

Programming Element Support Changes Summary

Visual Basic .NET changes the manner in which it supports various programming elements, mostly for interoperability with the common language runtime. Many Visual Basic 6.0 elements are renamed, reclassified, or combined with other programming elements for Visual Basic .NET. Several elements are no longer supported, because the common language runtime includes functionality that makes them unnecessary.

For additional information on changes to Visual Basic — including the integrated development environment (IDE), Web functionality, projects, forms, constants, and the Circle, Line, and Pset methods — see Introduction to Visual Basic .NET for Visual Basic Veterans.

The following table lists changed programming elements and their replacements.

Visual Basic 6.0 programming element Visual Basic .NET
equivalent
Namespace, class, or run-time library location
Abs function Abs Method System Namespace, Math Class
AscB function Asc Function Visual Basic Run-Time Library Members, Strings module
As Any keyword
phrase
Not supported in Visual Basic .NET. See Declaration Syntax Changes in Visual Basic Does not apply
Atn function Atan Method System Namespace, Math Class
Calendar property CurrentCulture Property System.Globalization Namespace, CultureInfo Class
ChDir statement ChDir Function Visual Basic Run-Time Library Members, FileSystem module
ChDrive statement ChDrive Function Visual Basic Run-Time Library Members, FileSystem module
Chr$, ChrB, functions Chr Function Visual Basic Run-Time Library Members, Strings module
Close statement FileClose Function Visual Basic Run-Time Library Members, FileSystem module
Cos function Cos Method System Namespace, Math Class
Currency data type Decimal Data Type; see Data Type Changes in Visual Basic Visual Basic Run-Time Library Members, VariantType Enumeration
CVDate function DateValue Function Visual Basic Run-Time Library Members, DateAndTime module
CVError function Error Statement Does not apply
Date function,
Date statement
Now Property, Today Property Visual Basic Run-Time Library Members, DateAndTime module
Date$ function DateString Property Visual Basic Run-Time Library Members, DateAndTime module
Debug.Assert
method
Assert, Fail methods System.Diagnostics Namespace, Debug Class
Debug.Print
method
Write, WriteIf, WriteLine, and WriteLineIf methods System.Diagnostics Namespace, Debug Class
Deftype statements Not supported in Visual Basic .NET. See Data Type Changes in Visual Basic Does not apply
DeleteSetting
statement
DeleteSetting Function Visual Basic Run-Time Library Members, Interaction module
DoEvents function DoEvents Method System.Windows.Forms Namespace, Application Class
Empty keyword Nothing Does not apply
Eqv operator = Operator; see Boolean Operator Changes in Visual Basic Does not apply
Exp function Exp Method System Namespace, Math Class
FileCopy statement FileCopy Function Visual Basic Run-Time Library Members, FileSystem module
Get statement FileGet Function Visual Basic Run-Time Library Members, FileSystem module
GoSub statement Not supported in Visual Basic .NET; use the Return Statement. See Control Statement Changes in Visual Basic Does not apply
Initialize event Not supported in Visual Basic .NET; use Sub New. See Class and Interface Changes in Visual Basic and Using Constructors and Destructors Does not apply
Imp operator Not supported in Visual Basic .NET. See Not and Or operators, and Boolean Operator Changes in Visual Basic Does not apply
Input #, Input$ statements,
Input$, InputB,
InputB$ functions
Input Function Visual Basic Run-Time Library Members, FileSystem module
Instancing property Not supported in Visual Basic .NET. See Class and Interface Changes in Visual Basic Does not apply
InStrB function InStr Function Visual Basic Run-Time Library Members, Strings module
IsEmpty function IsNothing Function Visual Basic Run-Time Library Members, Information module
IsMissing function Not supported in Visual Basic .NET. See Procedure Declaration Changes in Visual Basic Does not apply
IsNull function IsDbNull Function Visual Basic Run-Time Library Members, Information module
IsObject function IsReference Function Visual Basic Run-Time Library Members, Information module
Kill statement Kill Function Visual Basic Run-Time Library Members, FileSystem module
LCase$ function LCase Function Visual Basic Run-Time Library Members, Strings module
Left$, LeftB,
LeftB$ functions
Left Function Visual Basic Run-Time Library Members, Strings module
LenB function Len Function Visual Basic Run-Time Library Members, Strings module
Let, Set assignment
statements
Not supported in Visual Basic .NET; the new Set statement is unrelated to the older one. See Default Property Changes in Visual Basic Does not apply
Line Input #
statement
LineInput Function Visual Basic Run-Time Library Members, FileSystem module
Lock statement Lock, Unlock Functions Visual Basic Run-Time Library Members, FileSystem module
Log function Log Method System Namespace, Math Class
LSet, RSet
statements
LSet Function, PadRight, PadLeft; see Data Type Changes in Visual Basic Visual Basic Run-Time Library Members, Strings module and System Namespace, String Class
LTrim$ function LTrim Function Visual Basic Run-Time Library Members, Strings module
MidB function Mid Function Visual Basic Run-Time Library Members, Strings module
MidB statement Mid Statement Visual Basic Run-Time Library Members, Strings module
MkDir statement MkDir Function Visual Basic Run-Time Library Members, FileSystem module
Name statement Rename Function Visual Basic Run-Time Library Members, FileSystem module
Now function Now Property Visual Basic Run-Time Library Members, DateAndTime module
Null keyword Nothing Does not apply
Oct$ function Oct Function Visual Basic Run-Time Library Members, Conversion module
On ... GoSub
construction
Not supported in Visual Basic .NET; use Select Case Statement. See Control Statement Changes in Visual Basic Does not apply
On ... GoTo
construction
Not supported in Visual Basic .NET; use Select Case Statement. See Control Statement Changes in Visual Basic Does not apply
Open statement FileOpen Function Visual Basic Run-Time Library Members, FileSystem module
Option Base
statement
Not supported in Visual Basic .NET. See Array Bound Changes in Visual Basic Does not apply
Option Private
Module statement
Not supported in Visual Basic .NET; use Module Statement. See Class and Interface Changes in Visual Basic Does not apply
Print # statement Print, PrintLine Functions Visual Basic Run-Time Library Members, FileSystem module
Property Get,
Property Let,
Property Set
statements
Not supported in Visual Basic .NET. See Property Changes in Visual Basic Does not apply
Put statement FilePut Function Visual Basic Run-Time Library Members, FileSystem module
Reset statement Reset Function Visual Basic Run-Time Library Members, FileSystem module
Right$, RightB
functions
Right Function Visual Basic Run-Time Library Members, Strings module
RmDir statement RmDir Function Visual Basic Run-Time Library Members, FileSystem module
Round function Round Method System Namespace, Math Class
RSet, LSet
statements
RSet Function; see Data Type Changes in Visual Basic Visual Basic Run-Time Library Members, Strings module
RTrim$ function RTrim Function Visual Basic Run-Time Library Members, Strings module
SaveSetting
statement
SaveSetting Function Visual Basic Run-Time Library Members, Interaction module
Scale method Not supported in Visual Basic .NET Does not apply
Set, Let assignment
statements
Not supported in Visual Basic .NET; the new Set statement is unrelated to the older one. See Default Property Changes in Visual Basic Does not apply
SetAttr statement SetAttr Function Visual Basic Run-Time Library Members, FileSystem module
Sgn function Sign Function System Namespace, Math Class
Sin function Sin Method System Namespace, Math Class
Sqr function Sqrt Function System Namespace, Math Class
String function String Constructor; see String ($) Function Changes in Visual Basic System Namespace, String Class
String ($) functions Not supported in Visual Basic .NET. See String ($) Function Changes in Visual Basic Does not apply
Terminate event Not supported in Visual Basic .NET; use Sub Dispose and Sub Finalize. See Class and Interface Changes in Visual Basic and Using Constructors and Destructors Does not apply
Time function,
Time statement
TimeOfDay Property; see DateTime Structure, Date Data Type Visual Basic Run-Time Library Members, DateAndTime module
Time$ function TimeString Property Visual Basic Run-Time Library Members, DateAndTime module
Timer function Timer Property Visual Basic Run-Time Library Members, DateAndTime module
Trim$ function LTrim, RTrim, and Trim Functions Visual Basic Run-Time Library Members, Strings module
Type statement Not supported in Visual Basic .NET; use Structure Statement. See Structure Declaration Changes in Visual Basic Does not apply
UCase$ function UCase Function Visual Basic Run-Time Library Members, Strings module
Unlock statement Lock, Unlock Functions Visual Basic Run-Time Library Members, FileSystem module
Variant data type Object Data Type; see Universal Data Type Changes in Visual Basic Does not apply
Wend keyword While...End While Statements and End Statement; see Control Statement Changes in Visual Basic Does not apply
Width # statement FileWidth Function Visual Basic Run-Time Library Members, FileSystem module
Write # statement Write, WriteLine Functions Visual Basic Run-Time Library Members, FileSystem module

See Also

Language Changes in Visual Basic | Introduction to Visual Basic .NET for Visual Basic Veterans

Show:
© 2014 Microsoft