why when i'm runing the program the for's doesn't run in Parallel after the "one" for is finish the "two" for begin thanks in advance (im a noobie in C#)
private void button1_Click(object sender, EventArgs e)
{
Thread t = new Thread(new ThreadStart(Threadtest));
t.Start();
for(int i = 0 ;i<5;i++)
richTextBox1.Text = richTextBox1.Text + "one"+i+"\n";
}
private void Threadtest()
{
for (int i = 0; i < 5; i++)
{
MethodInvoker action = delegate { richTextBox1.Text = richTextBox1.Text + "two" + i + "\n"; };
richTextBox1.Invoke(action);
}
}