I am using this program as an example which sort these arrays according to "b".
int[] a = { 5, 2, 3 };
int[] b = { 4, 1, 2 };
string[] c = { "John", "Peter", "Max" };
Array.Sort(b.ToArray(), c);
Array.Sort(b.ToArray(), a);
Array.Sort(b);
Console.WriteLine(string.Join(", ", a));
Console.WriteLine(string.Join(", ", b));
Console.WriteLine(string.Join(", ", c));
The Result is:
2, 3, 5
1, 2, 4
Peter, Max, John
I want to make the result appear vertically for e.g.
2 1 Peter
3 2 Max
5 4 John