Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dim as New or Set as New?
Message
From
30/04/2003 15:48:22
 
 
To
30/04/2003 15:25:01
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00783384
Message ID:
00783401
Views:
10
Use the second method, with the first one there is a performance hit every time you access the object because VB has to check whether the object has already been instanciated.

Roman

>Some objects can be coded as
>
Dim x As New myObject
>
>while some others should be done this way
>
Dim x as myObject
>Set x = New myObject
>
>How do I know which is which and why the different approach?
>
>Just wondering...
>
>Tnx Ü
Roman Rehak, MCSD, MCDBA, MCSA
Competitive Computing
354 Mountain View Drive
Colchester, VT 05446-5824
802-764-1729
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform