Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dim as New or Set as New?
Message
De
30/04/2003 15:48:22
 
 
À
30/04/2003 15:25:01
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00783384
Message ID:
00783401
Vues:
11
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform