在AddressOf委托VB中传递参数/参数

时间:2012-08-22 07:27:39

标签: vb.net multithreading delegates

我有下面的代码,并希望将这些部分放在单独的线程中。

 Dim objThreadedReq = From reqThreaded In objRequestList
                             Where reqThreaded.IsThreaded = True
        Dim trThreadedRequests As Thread = New Thread(New ThreadStart(AddressOf PoolThreadedRequests))
        trThreadedRequests.Start()

我创建了一个函数PoolThreadedRequests(objRequestList As RequestList)

如何在我的线程函数中传递objThreadedReq集合?

1 个答案:

答案 0 :(得分:1)

谢谢Tim,

“看一下ParameterizedThreadStart Delegate”