📜  c# 从另一个线程更新控件 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:39.696000             🧑  作者: Mango

代码示例1
// Running on the worker thread
string newText = "abc";
form.Label.Invoke((MethodInvoker)delegate {
    // Running on the UI thread
    form.Label.Text = newText;
});
// Back on the worker thread