Exemplo n.º 1
0
 private void AddName(object sender, EventArgs e)
 {
     if (this.textBox1.Text.Length > 0)
     {
         listofnames.AddName(this.textBox1.Text);
         this.textBox1.Clear();
     }
 }
Exemplo n.º 2
0
 public void Button1Click(Object sender, System.EventArgs e)
 {
     if (textBox1.Text != "")
     {
         list.AddName(textBox1.Text);
         textBox1.Text = "";
     }
 }