Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
GeneralRe: reguarding strings Pin
jtmtv189-Mar-03 16:05
jtmtv189-Mar-03 16:05 
GeneralRe: reguarding strings Pin
jtmtv189-Mar-03 16:22
jtmtv189-Mar-03 16:22 
GeneralRe: reguarding strings Pin
leppie10-Mar-03 8:21
leppie10-Mar-03 8:21 
GeneralRe: reguarding strings Pin
Anonymous10-Mar-03 11:05
Anonymous10-Mar-03 11:05 
GeneralAccessing vairable etc in a different class Pin
monrobot138-Mar-03 12:27
monrobot138-Mar-03 12:27 
GeneralRe: Accessing vairable etc in a different class Pin
leppie8-Mar-03 12:48
leppie8-Mar-03 12:48 
GeneralRe: Accessing vairable etc in a different class Pin
monrobot139-Mar-03 11:31
monrobot139-Mar-03 11:31 
GeneralRe: Accessing vairable etc in a different class Pin
jpwkeeper10-Mar-03 1:59
jpwkeeper10-Mar-03 1:59 
I believe the difficulty you're having is that you're thinking of the problem from the wrong angle. It's not a mechanical thing.

It sounds like you want two peer classes to communicate, OR you want an owned class to be able to call back to its owner. The problem is that you're coming at it from the wrong angle. Instead of the worker class pulling information from the form, your form should push information to the worker class.

Why? Because the worker class is many more times likely to be re-used than is the form class. Forms are usually the most specific part of your app, and worker classes the most general.

If it is an owned class getting information from its owner, don't do it. Instead have the owner push the information down to the owned class. This reduces your coupling of the two classes which will allow you to re-use this class some day. Remember, the first rule of generalized classes is the "I'll never" rule. Right now you're saying "I'll never need to re-use this class" which guarantees that you will. If that class accesses specific controls and/or properties in your forms class, you won't be able to re-use it.

If this doesn't describe your problem, let me know more specifics and I'll show you another angle.
GeneralRe: Accessing vairable etc in a different class Pin
monrobot1310-Mar-03 15:42
monrobot1310-Mar-03 15:42 
GeneralRe: Accessing vairable etc in a different class Pin
jpwkeeper11-Mar-03 3:40
jpwkeeper11-Mar-03 3:40 
GeneralInherited Static Constructors Pin
moredip8-Mar-03 9:51
moredip8-Mar-03 9:51 
GeneralRe: Inherited Static Constructors Pin
Nnamdi Onyeyiri8-Mar-03 10:45
Nnamdi Onyeyiri8-Mar-03 10:45 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 11:49
moredip8-Mar-03 11:49 
GeneralRe: Inherited Static Constructors Pin
leppie8-Mar-03 12:01
leppie8-Mar-03 12:01 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 12:14
moredip8-Mar-03 12:14 
GeneralRe: Inherited Static Constructors Pin
leppie8-Mar-03 12:44
leppie8-Mar-03 12:44 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 12:56
moredip8-Mar-03 12:56 
GeneralRe: Inherited Static Constructors Pin
leppie8-Mar-03 13:14
leppie8-Mar-03 13:14 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 13:43
moredip8-Mar-03 13:43 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 13:53
moredip8-Mar-03 13:53 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 14:10
moredip8-Mar-03 14:10 
GeneralRe: Inherited Static Constructors Pin
leppie8-Mar-03 14:25
leppie8-Mar-03 14:25 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 16:05
moredip8-Mar-03 16:05 
GeneralRe: Inherited Static Constructors Pin
leppie9-Mar-03 7:02
leppie9-Mar-03 7:02 
GeneralRe: Inherited Static Constructors Pin
moredip9-Mar-03 7:26
moredip9-Mar-03 7:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.