How to call a method that takes multiple parameters in a thread?

前端 未结 4 1998
無奈伤痛
無奈伤痛 2021-02-08 07:54

I am building a C# Desktop application. How do I call a method that takes multiple parameters in a thread. I have a method called Send(string arg1, string arg2, string arg3) , I

4条回答
  •  醉话见心
    2021-02-08 08:30

    You could define a type, that encapsulates the parameters you want to pass and start the thread with a reference to an instance of this type.

提交回复
热议问题