Windows - carrying a property value to next form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Windows app development, how can you carry a property value from one form
to another?

In web development, you would use session.

I have been trying to use properties. I have a class with a property of type
int.
In form 1 i set my property as e.g. 20 but then when i check the value of my
property from form 2, it returns a 0.

How can i transfer accross to form 2 the property value i set in form 1?

thank you
 
CodeRazor,

It depends on you design, but in order to share properties between all
isntances of a class you need to declare the property and/or fields
*static*.
 

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