thread with multiple parameters

前端 未结 11 1582
一生所求
一生所求 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 05:08

    You need to wrap them into a single object.

    Making a custom class to pass in your parameters is one option. You can also use an array or list of objects, and set all of your parameters in that.

提交回复
热议问题