forum

Home / DeveloperSection / Forums / Compare input to list

Compare input to list

Manoj Bhatt 1704 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");
    }
}

c# c# 
Updated on 17-Dec-2013

Can you answer this question?


Answer

1 Answers

Liked By