Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie Question - Why does this work?
Message
De
02/11/2009 14:50:58
 
 
À
02/11/2009 14:28:26
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01432708
Message ID:
01432763
Vues:
41
That makes sense, Tim.

Thanks


>>Viv was right in the response also. When the method you have this code in goes out of scope, the reference will also go out of scope. Your reference is this one.

GetHolderForm myGetHolderForm = new GetHolderForm();
if you were to put the reference in your class rather than in a method and set it only in your method, then it would be in scope until the class goes out of scope.

// In the class
GetHolderForm myGetHolderForm;

// In your method
myGetHolderForm = new GetHolderForm();
Tim
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform