Firstly, you do not appear to need a loop since counter
is going from counter
to counter
.
Secondly, I suspect you have an out-by-one error.
What happens if you try this?
private void btnAverage_Click(object sender, EventArgs e)
{
if (counter > 0)
MessageBox.Show("" + student[counter-1].Average);
}