0
讨厌问这个问题,但我错在哪里?列表<Label>投掷指数超出范围。必须是非负数且小于集合的大小。错误
public void foo(object sender, EventArgs e)
{
List<Label> exerciseLabels = new List<Label>();
string tempExercise = exerciseTextBox.Text;
int numExercises = 0;
day[tempDay].addExercise(numExercises, tempExercise);
exerciseLabels.Add(new Label());
exerciseLabels[1].Text = string.Format("{0}. {1}", numExercises + 1, tempExercise);
}
我收到一个参数是超出范围。
在此先感谢。
谢谢Marc! – user1582483 2012-08-15 22:38:56