кто знает язык C# для microsoft visual studio 2010 помогите плиз что не так с кодом ?
private void button24_Click(object sender, EventArgs e)
{
int f, i, a;
for (f = 0; f < listBox1.Items.Count; f++)
{
for (i =0; i int.Parse(listBox1.Items.ToString())) {
a=int.Parse(listBox1.Items[i-1].ToString());
listBox1.Items[i - 1] = listBox1.Items;
listBox1.Items=a;
}
}
}
}
там index =-1 в строчке for (i =0; i int.Parse(listBox1.Items.ToString())) {
сама форма запускается, но при нажатии кнопки форма виснет