嗨我有一个应用程序,我做了,我试图通过运行多线程到目前为止,我已经做到了这一点。多线程问题
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 *这里? –