private void button1_Click(object sender, EventArgs e) { string s = this.label1.Text; if (this.listBox1.Items.Contains(s)) MessageBox.Show("不能重复添加!"); else this.listBox1.Items.Add(s); }