Question:
Visual Basic----- How to sort an array that is using other arrays as its elements?
babyfacedassasin1
2008-03-01 16:40:25 UTC
Public Shared _strBookTitle(_intSizeOfArray) As String
Private _decBookPrice(_intSizeOfArray) As Decimal
Private _intQuantityInStock(_intSizeOfArray) As Integer
Private _intQuantityOnOrder(_intSizeOfArray) As Integer

I have these four arrays and I am sorting the _strbooktitle.
Array.Sort(_strBookTitle)

But when I do so , the values such as ( _decBookPrice, _intQuantityInStock, _intQuantityOnOrder) are not corresponding to the correct amounts

Please help
Three answers:
Lapband Man
2008-03-02 15:38:27 UTC
Set up a structure



Put the structure in an array, then sort the item in the structure.



Or set up a dataview on the four fields, then sort the column you want.
gracely
2016-10-23 06:35:37 UTC
Why seek for till you would also be putting or deleting? The looked after set helps you to say the suggestions is ordered or 'normalized' -- a call for to examine you gained't corrupt the suggestions.
2008-03-01 16:50:15 UTC
sry usually good at vb but cant help on this i need help wit arrays to


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...