How to pass multiple parameters in thread in VB

前端 未结 8 1419
面向向阳花
面向向阳花 2020-12-30 05:31

I\'m looking to pass two or more parameters to a thread in VB 2008.

The following method (modified) works fine without parameters, and my status bar gets updated ver

8条回答
  •  长发绾君心
    2020-12-30 05:51

    Just create a class or structure that has two members, one List(Of OneItem) and the other Integer and send in an instance of that class.

    Edit: Sorry, missed that you had problems with one parameter as well. Just look at Thread Constructor (ParameterizedThreadStart) and that page includes a simple sample.

提交回复
热议问题