Array of threads

  • Thread starter Thread starter Overburn
  • Start date Start date
O

Overburn

Is it possible to create an array of threads? and if so, can someone give an
example of how.
 
Is it possible to create an array of threads?

Sure.

Dim twoThreads(1) As Thread
twoThreads(0) = New Thread(AddressOf Thread1Proc)
twoThreads(1) = New Thread(AddressOf Thread2Proc)



Mattias
 
Thanks, now one last question, I know this is about arrays in general, but
how do I increment the array?
 
Thanks, now one last question, I know this is about arrays in general, but
how do I increment the array?

You can use the ReDim statement, or use a ArrayList collection
instead.



Mattias
 
* Mattias Sjögren said:
You can use the ReDim statement, or use a ArrayList collection
instead.

In this case, 'ReDim Preserve' is useful, but I prefer a more dynamic
data structure like a collecton ('ArrayList', ...).
 
Back
Top