Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie Question - Why does this work?
Message
From
02/11/2009 14:50:58
 
 
To
02/11/2009 14:28:26
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01432708
Message ID:
01432763
Views:
39
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform