Pass Parameters through ParameterizedThreadStart

前端 未结 7 1114
伪装坚强ぢ
伪装坚强ぢ 2021-01-30 16:32

I\'m trying to pass parameters through the following:

Thread thread = new Thread(new ParameterizedThreadStart(DoMethod));

Any idea how to do th

7条回答
  •  说谎
    说谎 (楼主)
    2021-01-30 17:08

    new Thread(() => { DoMethod(a, b, c); }).Start();
    

    or

    new Thread(() => DoMethod(a, b, c)).Start();
    

提交回复
热议问题