I have a textbox in my main form.
Now I have created a function which is used to set the value of the text box.
public void SetTextOfTextBox(String text)
{
textbox1.text = text;
}
Now in my main form I call another class (class b) which does some work for me. Now i want to be able to call my setTextofTextBox function from class b.
Now if I try Form1.SetTextOfTextBox("test");
this doesn't work.
What am I doing wrong?
How do I access components of a a Form from another class.