I got problem here with my C# code..

What I want to do with this code is, that when I type something from textbox with the same symbols (the same name), it shows, that I can't add it in the listbox two or more times.
So I made this code:

```
void Btn_addClick(object sender, EventArgs e)
{
    string thelist = listBox1.Text;
    string text = textBox1.Text;

    if(text == thelist) 
    {
        MessageBox.Show("This name already exists!");
    }
    else
    {
        listBox1.Items.Add(textBox1.Text);
        textBox1.Text = "";
    }   
}

```

But the problem is, that it shows the MessageBox only if I select the name from the list and compare it from text box. If I don't select anything or other word, it adds the same word without telling that it already exists.