add this code on the add button click event.
assuming your textbox's name is textBox1 and the listbox's name is listBox1.
string[] contents = new string[4]
{
textBox1.Text,
textBox2.Text,
textBox3.Text,
textBox4.Text
};
foreach (string content in contents)
{
bool isValid = true;
foreach (string item in listBox1.Items)
{
if (item == content)
{
MessageBox.Show("Already in the list.");
isValid = false;
}
}
if (isValid)
listBox1.Items.Add(content);
}