public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false;
}
private void button1_Click(object sender, EventArgs e)
{
Thread th = new Thread(test);
th.Start(new string[] { "1", "2", "3", "4" });
}
public void test(object o)
{
string[] arr = o as string[];
foreach (var item in arr)
{
label1.Text = item;
System.Threading.Thread.Sleep(1000);
}
}
}