Users Pricing

forum

Home Forums Compare input to list – MindStick

Compare input to list

Manoj Bhatt 2091 17 Dec 2013

Is it possible to compare the input text in a textbox in a windows form to the items in a list and then save it if it doesn't exist there. 

public Form1()
{
    InitializeComponent();
    if (txtId.Text == Id.myList)
    {
        myList.Add(txtId.Text);
    }
    else (){
        MessageBox.Show("Id already exists");
    }
}

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md