public static void plusPerson(PersonPlan1Manuel p) { if (nbPersonCree < nPmax) { tP[nbPersonCree] = p; } else { nPmax += 40; PersonPlan1Manuel[] aux = new PersonPlan1Manuel[nPmax]; for (int i = 0; i < nbPersonCree; i++) { aux[i] = tP[i]; } tP = aux; tP[nbPersonCree] = p; } nbPersonCree++; }
private void button11_Click(object sender, EventArgs e) { PersonPlan1Manuel p = new PersonPlan1Manuel("haut"); Plan1Manuel.plusPerson(p); }