Hello:
In all my forms I have around 30+ variables that are public for the form.
How can I have the 30+ in one place so I dont have to check is any of then are missing in any of the forms?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
GustavoPosted May 16, 2010, 2:12 PM
I did create a "Generic" Form (FormGeneric). Then I created a form with the inhearit, but it does not copy the variables in it.
I will pay with it and try to figure it out. Will get back to you, if I can not get it to work for me.
Kirtan PatelPosted May 16, 2010, 12:28 PM
just redefine the methods you want to by using overriding the methods in base form ..
GustavoPosted May 16, 2010, 8:46 AM
I tried the Class, but then they are common, the values are the same.
The 30+ variable values, I need them to be unique to each Form.
Would like something like the c/c+ #include "Vars"
Example:
public string RunAs;
I have a variable called RunAs, I set it in each for to whatever I want it to run as. So, when I go from Form to Form, I want to keep the value that is was set for that Form.
Kirtan PatelPosted May 16, 2010, 5:26 AM
so you can access any of the variable from class file from any form ..
Jaish MathewsPosted May 16, 2010, 5:08 AM
It's not clear as once any variable missed, it's reference will throw compile error. So no separate checking needed as compiler already checking for you.