|
-
Jan 7th, 2003, 05:38 AM
#1
Thread Starter
Addicted Member
pass data to class or form
Hi
I have some data that needs to be pass to another form in order to do some operation, my question is should i pass the data to the form directly, or should i pass the data to a class and have the form acess the data trough properties of the class?
Thanks!
-
Jan 7th, 2003, 06:58 AM
#2
New Member
Why not pass the new form an object that is an instance of a class that contains the data
-
Jan 7th, 2003, 09:56 AM
#3
Registered User
I think this is up to what kind of information it is, the amount of data and such.
If it is information from many controls on the 1st form I would pass the form to the constructor of the second form to get a reference to the complete form. But if it is 1 or 2 things you might as well pass just those things to the second form.
If its not information in the form but rather information in another object created from the first form I would pass the object instead.
If it is a s--tload of data it might be good to serialize it somehow and then get it back when you really need it to minimize memory usage and such.
If you elaborate a bit about your situation and what data we are talking about it might be easier to give a good recommendation.
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
|