|
-
Oct 18th, 2009, 09:30 AM
#1
Re: Need to provide variables from Main to all other classes
A class should not need to know about anything external to itself. Therefore, if a class needs to access any variable, including forms and controls, that are not members of the class, then to do it right, pass the variable to the class. This can be done during construction by creating a Sub New that takes the variable as an argument, or it can be done at some later time via a property or method of the class.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|