Referencing a Form from within a user class

  • Thread starter Thread starter RSH
  • Start date Start date
R

RSH

I have a situation where I am working with a user class and I need to
reference the form. Is it best to pass the form object to the constructor
of the class on instantiation, or to access it another way?

Thanks,
Ron
 
Well,
You really haven't described what the actual business logic situation is
like here, so...

You could certainly have a class which accepts a Form class instance in its
ctor and stores this in a private field of type Form.
Peter
 
Well,
You really haven't described what the actual business logic situation is
like here, so...

You could certainly have a class which accepts a Form class instance in its
ctor and stores this in a private field of type Form.
Peter

Or maybe, depending on the case, use events to pass data from the
class to the Form...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top