I have a class with the follwing method in
- public static void myMethod(Home_Form formObject)
- {
- foreach (Control X in formObject.Controls)
- {
- var tb = X as TextBox;
- if (tb !=null)
- if (tb.Text == @"53")
- {
-
- tb.Text = @"Hammer";
- }
- }
- }
And in my Mainform
- private void bonus1TypeTextBox_TextChanged(object sender, EventArgs e)
- {
- Variables.myMethod(this);
- }
Now I Know this is wrong, But if any text box on my Main Form contains 53 when being pulled from a dataset I need to changes its text to Hammer....
Can somebody please advice, hope I have made myself clear.
Jay