Glenn Patton

Glenn Patton

  • NA
  • 308
  • 82.9k

Searching a List

May 17 2012 5:59 AM
Hi All,

If have a List<..> of data in a rich text box now I need to search the data to make sure none is repeated (radio system do not ask!) I have found the .Exists property, the example uses integers:  
bool exists = list.Exists(element => element > 10);
Console.WriteLine(exists);

// Check for numbers less than 7
exists = list.Exists(element => element < 7);
Console.WriteLine(exists);
The issue is the data comes in as a string and I don't want to get caught up trying to split them up as integers yet.

Glenn

Answers (5)