C# newbie question passing variables

  • Thread starter Thread starter Guest
  • Start date Start date
Assuming that the first form creates and shows the second form, a couple
ways come to mind. You could create a property on the second form that holds
the boolean and then push the boolean into that property before showing the
new form...

Form2 f = new Form2();
f.BoolProp = true;
f.Show();

Or you can create a constructor overload on the second form that accepts a
boolean...

Form2 f = new Form2(true);
f.Show();
 
Hello Tim THANKS! that got me pointed in the right direction, I found the
class diagram and figured out how to add a Property or constructor. I decided
all I needed was a field. It works great now.

Thanks Jon Stroh
 
Back
Top