Thanattha Bussapak

Thanattha Bussapak

  • NA
  • 20
  • 19.5k

How to check data input in LING XML

Feb 19 2014 11:48 AM
I create list in LINQ XML ,I add data in textbox when i save to LINQ XML I check text in the text box.It's ok .But, I want to check it unique.How should I do?

// Confirm there is some text in the text box.
if (textBox.Text.Length > 0)
{
// Create a new to-do item.
   ToDoItem newToDoItem = new ToDoItem
    {
        ItemName = textBox.Text,
        Category = (ToDoCategory)categoriesListPicker.SelectedItem
     };
// Add the item to the ViewModel.
 App.ViewModel.AddToDoItem(newToDoItem);
          
}