So I have a particular issue.
I have a standard 2D array (non-jagged) and a string array. They are linked lets just say via the 1st column of the 2D array.
So that means I would like to sort them together (its not a key based system so I can't use the columns as keys into the string array, just when ever a row in the 2D array moves so too shall the value in equivalent row of the string array move).
Not sure what is the best solution here. The dirty method that I have tried and works is standard nested loops to sort via the first column and move everything accordingly.
I just want to know if there is a better solution than this, perhaps using Linq and things like that??
Dictionary<string,int[,]>not work better in this case? dotnetperls.com/sort-dictionary i assumed the OP is looking for a column and row relationship between his string[] and value[,] arrays. something like string[0]="Cell1" Cells[0,0]=0 Cells[0,1]=1 etc i wanted to keep it short as i also assumed the OP didn't hear of the map/dict which if my assumption above is correct the OP would be better having a key/value relationship and using the tools provided