怎么逆反后显示不出来,求各位前辈指教。
int[] a = new int[10]; int i;private void Form1_Load(object sender, EventArgs e)
{
label1.Text = "逆反前的数字顺序是:\n";
for (i = 0; i < a.Length; i++)
{
a[i] = i;
label1.Text = label1.Text+a[i].ToString() + ",";
}
}
private void button1_Click(object sender, EventArgs e)
{
label2.Text = "逆反后的顺序是:\n";
for (i = a.Length - 1; i <=0;i-- )
{
label2.Text = label2.Text + Convert.ToString(a[i]) + ",";
}
}