原
private void WriteLabel(string s)
{
if (label1.InvokeRequired)
{
WriteLabelDeletegate d = new WriteLabelDeletegate(WriteLabel);
label1.Invoke(d);
}
else
{
label1.Text = s;
}
}
报错:参数计数不匹配
改后
private void WriteLabel(string s)
{
if (label1.InvokeRequired)
{
WriteLabelDeletegate d = new WriteLabelDeletegate(WriteLabel);
label1.Invoke(d, new object[] { s });
}
else
{
label1.Text = s;
}
}