我有2个数组,我想要排序,但保持元素对齐正确。例如,元素[x]上的button1与元素[x]上的textbox1保持一致。这可能是另一个我可以使用的结构,但我无法弄清楚。同时排序2个数组
String[] Teams = {
textBox1.Text, textBox2.Text, textBox3.Text,
textBox4.Text, textBox5.Text, textBox6.Text,
textBox7.Text, textBox8.Text, textBox9.Text
};
int[] Scores = {
Convert.ToInt32(button1.Text), Convert.ToInt32(button2.Text), Convert.ToInt32(button3.Text),
Convert.ToInt32(button4.Text), Convert.ToInt32(button5.Text), Convert.ToInt32(button6.Text),
Convert.ToInt32(button7.Text), Convert.ToInt32(button8.Text), Convert.ToInt32(button9.Text)
};