嗨我有一個應用程序,我做了,我試圖通過運行多線程到目前爲止,我已經做到了這一點。多線程問題
Public Class mainfrm
Dim x As System.Threading.ThreadStart
Public Function RunThreads(count As Integer, start As ThreadStart) As List(Of Thread)
Dim list As New List(Of Thread)
For i = 0 To count - 1
Dim thread = New Thread(start)
thread.Start()
list.Add(thread)
Next
Return list
End Function
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
RunThreads(10, x)
但是當我點擊它給了我一個錯誤
x的值是什麼?錯誤消息推斷x是空的 – har07
我建議你閱讀關於多線程的MSDN文章,因爲你的代碼毫無意義... http://msdn.microsoft.com/en-us/library/eed6swsx(v = vs.90).aspx –
什麼是* start *這裏? –