1  //错误写法:
 2 private void SyncData()
 3        {
 4            try
 5            {
 6               Thread t = new Thread(new ThreadStart(remoteObject.SyncPbcsmsData));
 7               t.Start();
 8            }

 9            catch (Exception ex)
10            {
11                MessageBox.Show(ex.Message);
12            }

13        }
14
15     //正确写法:
16 Thread t = new Thread(new ThreadStart(SyncData));
17  t.Start();
18
19 private void SyncData()
20        {
21            try
22            {
23               remoteObject.SyncPbcsmsData();
24            }

25            catch (Exception ex)
26            {
27                MessageBox.Show(ex.Message);
28            }

29        }

30
31
posted on 2007-04-19 16:40  xiaowy  阅读(236)  评论(0编辑  收藏  举报