Skip to main content
 首页 » 编程设计

C# syncronizationcontext

2022年07月19日133lhb25

FormDesign.cs

            增加变量定义  public string testName { get; set; }

TaskWrapper.cs

                    string tmpTest = "abcdef";
                    FormAuto.formDesign.testName = tmpTest;                    ////////////////
                    FormAuto.formDesign.formDesignThread.Post(delegate  ///////////////
                    {
                        FormAuto.formDesign.testName = tmpTest;
                    }, null);


本文参考链接:https://www.cnblogs.com/xihong2014/p/11875553.html