private void BtnAdd_Click(object sender, EventArgs e) { animals[numOfAnimals] = new Person(TxtName.Text, Convert.ToInt32(TxtAge.Text)); numOfAnimals += 1; TxtName.Text = ""; TxtAge.Text = ""; BtnDisplay.PerformClick(); Array.Resize(ref animals, numOfAnimals + 1); }
private void BtnDouble_Click(object sender, EventArgs e) { for (int r = 1; r <= 12; r++) { for (int c = 1; c <= 4; c++) { if (c != 3) { Violations[r, c, 2] *= 2; } } } BtnDisplay.PerformClick(); }