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