多线程中有无new ThreadStart()的区别

from:http://topic.csdn.net/u/20090314/20/564e9211-bb5e-4570-b73c-4fcf30350a30.html

以下这2段多线程代码有什么区别,哪种能更好的异步执行
第一段
  Thread thread_copyormove = new Thread(new ThreadStart(ThreadMain));
  thread_copyormove.IsBackground = true;
  thread_copyormove.Start();
第二段
  Thread thread_copyormove = new Thread(ThreadMain);
  thread_copyormove.IsBackground = true;
  thread_copyormove.Start();
主要就是第一句代码有无new ThreadStart()
-----------------------------------------------------------
没有什么区别,以前c#2.0还不支持直接写方法呢,这是因为c#3.0的编译器强大了,支持直接写方法名,或者delegate{},编译后的结果应该是一样的。

posted @ 2012-05-24 16:20  Yaoquan.Luo  阅读(347)  评论(0编辑  收藏  举报