base {System.ApplicationException} = {"发生了异常“Microsoft.VisualStudio.Debugger.Runtime.CrossThreadMessagingException”"}代码在线程中执行,开始已经设置了CheckForIllegalCrossThreadCalls = false;代码如下:                     //读取交流电表数据
                    cmd.CommandText = "select top 1 * from tabAcinfoRec order by RecDatetime Desc";
                    rd = cmd.ExecuteReader();
                    if (rd.Read())
                    {
                        foreach (Control l in this.Controls)
                        {
                            if (l.Tag != null)
                            {
                                if (Convert.ToString(l.Tag) == "l_AC")
                                {
                                  // l.Text = string.Format("{0,9}", string.Format(Convert.ToSingle(rd[l.Name].ToString()).ToString("0.0")));
                                    string s = string.Format("{0,10}", rd[l.Name].ToString());
                                    //((Label)l).Text = "0";
                                    l.Text = s;
                                    //这里读取或设置Text值会发生 "base {System.ApplicationException} = {"发生了异常“Microsoft.VisualStudio.Debugger.Runtime.CrossThreadMessagingException”"}" 错误
                                }
                            }
                        }                    }
                    rd.Close();