sodakotahusker
Programmer
- Mar 15, 2001
- 601
I want to have a form that normally is opened with no parameters and just presents a list of names users can choose from to populate the rest of the form for data entry purposes. Now I want to enter that same form but know specifically which name I want to choose from the DropDown. I was thinking I could create an overload of the constructor and pass in the value to that and have the code execute in the the called form?
something like public void new(string myValue)
I have never done something like this so maybe it is just not possible.
This alternative works just fine but I'd like to learn how to use the power of C# so I am exploring "Best Practices"
myForm f = new myForm();
f.Show();
f.cboList.Text = myvalue;
something like public void new(string myValue)
I have never done something like this so maybe it is just not possible.
This alternative works just fine but I'd like to learn how to use the power of C# so I am exploring "Best Practices"
myForm f = new myForm();
f.Show();
f.cboList.Text = myvalue;