예제 #1
0
 private void btnBatalhar_Click(object sender, EventArgs e)
 {
     lcoisa = new List <Coisa>();
     for (int i = 0; i < lbNome.Items.Count; i++)
     {
         Coisa nome = new Coisa(lbNome.Items[i].ToString());
         lcoisa.Add(nome);
     }
     atualizar_lista();
 }
예제 #2
0
        private void btnAdicionar_Click(object sender, EventArgs e)
        {
            Coisa newcoisa = new Coisa(txbNome.Text);

            lbNome.Items.Add(newcoisa.ToString());
        }