thread with multiple parameters

前端 未结 11 1577
一生所求
一生所求 2020-11-29 04:16

Does anyone know how to pass multiple parameters into a Thread.Start routine?

I thought of extending the class, but the C# Thread class is sealed.

Here is wh

11条回答
  •  执笔经年
    2020-11-29 04:57

    You can't. Create an object that contain params you need, and pass is it. In the thread function cast the object back to its type.

提交回复
热议问题