scoping

  • Thread starter Thread starter Cor Ligthert
  • Start date Start date
C

Cor Ligthert

Jsh,

It seems normal, however can you give a little sample with those to buttons
and one value. Just to show us how you did it. Not your original code.

Cor
 
What causes a classes field variables to lose their values inbetween events?
Has anybody experienced this behavior? I have a simple windows project with
a public member in a form that gets set by one button click event and then
its value is used in another button click event. Inbetween events its value
is lost. What's strange is my changes before the last build had nothing to
do with this form or variable?
 
When I changed the scope of all of my class types to public the problem went
away. Which raises another question how do you keep your derived types from
being used outside of your assembly?
 

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