I have different types of arrays let’s name them classA(), classB(), classC() and so on wtih same bounds (5) and needs
to reorder those like that:
At the moment , I need for all classes a seperate methoad to get right data type. When using a variant array, I need to determine all classes,
make a new variant array, copy it t varient , reorder and copy it back to the correct correct data type which seems not efficient and long coding.
I know there’s a sortWith method but this work only ascending. Is there an efficient way of reordering array of different type with specified indexes ?
Currently I do this but have a own method for each class:
dim shiftIdx as integer = if(indexToRemove>indexToInsert, 1, 0 )
if indexToInsert>theArray.Ubound then
theArray.Insert(indexToInsert, theArray(indexToRemove) )