I had a confusion let me explain it in brief. I have a form i placed one textbox and a command button. and I have one plain class.
class1 code.
class Class1
{
string s = "hi";
Form1 form1 = new Form1();
public void cl()
{
form1.textBox1.Text = s;
}
}
form1 code
private void button1_Click(object sender, EventArgs e)
{
Class1 class1 = new Class1();
class1.cl();
}
what my program should do is when i click on the button the text in the textbox should become "hi". My error is when I click the button nothing happens.