In Visual Basic 2005 is it possible to parallel sort three or maybe four arrays? I have a function that is trying to accomplish this but it only parallel sorts the second array with the Array that it is being sorted with. Here is the code
'listToArray' is just a function that converts a list to an 1-Dimensional array and 'setArrayToListCollection' just puts the array back into the appropriated list. Thank you for any help or advice you have to offer.Code:Sub ParallelListBoxSort(ByVal byList As ListBox, ByVal otherLists() As ListBox) Dim ii As Integer = 0 Dim a As Integer = otherLists.Length Dim lstArray() As String = listToArray(byList) While ii < a - 1 Dim newArray() As String = listToArray(otherLists(ii)) Array.Sort(lstArray, newArray) MessageBox.Show(otherLists(ii).Name) setArrayToListCollection(otherLists(ii), newArray) If ii = 0 Then setArrayToListCollection(byList, lstArray) End If ii += 1 End While End Sub




Reply With Quote