Thread and ThreadStart

后端 未结 4 1710
名媛妹妹
名媛妹妹 2020-12-30 22:23

Both of the following lines work same. but is there any hidden difference? and which one should be preferred?

Thread t1 = new Thread(aMethod);

Thread t2 = n         


        
4条回答
  •  迷失自我
    2020-12-30 22:48

    They are just the same but the second one allows you to use an extra parameter at the Thread starting method (well using ParametrizedThreadStart instead of ThreadStart).

提交回复
热议问题