In Form1 I have a textbox filled with char array values (*). Then in Form2 I change one of the array values (change * to some letter) and I have to update Form1 textbox. But when I press button - nothing happens. Form2 code snippet:
private void button2_Click(object sender, EventArgs e)
{
....
....
letter = (char)Form1.number;
textbox1.Text = letter.ToString(); //shows me the letter I'm replacing '*' with
}
private void button3_Click(object sender, EventArgs e)
{
frm1 = new Form1();
Form1.charArray[Convert.ToInt32(frm1.numericUpDown2.Value)] = letter; //which array value I'm changing
frm1.textBox2.Text = String.Empty;
for (int i = 0; i < frm1.numericUpDown1.Value; i++)
{
frm1.textBox2.Text += Form1.charArray[i];
}
}