Object Creation Changes in Visual Basic
Visual Basic 6.0
In Visual Basic 6.0, an object variable declared with the keywords As New is initialized to Nothing, meaning that no object has yet been created. Every time the variable is encountered during execution, it is evaluated before the code executes. If the variable contains Nothing, an object of the appropriate class is created prior to execution of the code that uses it.
Visual Basic .NET
In Visual Basic .NET, there is no implicit object creation. If an object variable contains Nothing when it is encountered, it is left unchanged and no instance is automatically created.
You can create an object with the same statement that declares the object variable. Each of the following two lines of code creates an object from a class, Dim Emp As New EmpObj ' Shorthand for next line. EmpObj, that is already defined in the application. The two lines are treated as equivalent, with the first being taken as shorthand for the second:
Dim Emp As EmpObj = New EmpObj ' EmpObj created; Emp points to EmpObj.
In both cases, an instance of the EmpObj class is created as soon as the Dim statement is executed, and Emp is initialized to a reference to the new object.
Parameterized Constructors
Some classes have constructors that take arguments. If you are creating an object from such a class, you can include its arguments in the declaration. The following example shows two equivalent declarations that pass arguments to the object's constructor, with the first being taken as shorthand for the second:
Dim Q As New Quark(12, 0.0035) ' Shorthand for next line.
Dim Q As Quark = New Quark(12, 0.0035) ' Parameterized constructor.

Comments
Join the conversation! Your thoughts help the community grow.