I think I understand what you are saying. You want to sort array a and c based on the values of b.
You can sort an array by another array using Array.Sort which lets you specify another array for keys for example:
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));
This will output your expected values. Note that we use ToArray to create a copy of the arrays when sorting by key, that's because Array.Sort sorts both they keys and the values, which we don't want. We don't sort the Keys (b in this case) till the end.
That's how we solve your immediate problem. However, gathered from the comments, you are trying to sort tabular data. When your data has some structure to it, say like this:
public class Item
{
public int A { get; set; }
public int B { get; set; }
public string C { get; set; }
}
It gets a lot easier.
var items = new[]
{
new Item {A = 5, B = 4, C = "John"},
new Item {A = 2, B = 1, C = "Peter"},
new Item {A = 3, B = 2, C = "Max"},
};
var sortedItems = items.OrderBy(i => i.B).ToArray();
This uses LINQ, which is perfect for what you are trying to do.
a,bandcare DataColumns of type int,int,string?