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
Loading

VulpesRank #55 · 29.2K reputationPosted May 17, 2012, 2:48 AM EDT
http://www.codeproject.com/Articles/286255/Using-LINQ-Queries
We also have a large number of articles on this site about various aspects of LINQ:
http://www.c-sharpcorner.com/tags/linq-tutorial
VulpesRank #55 · 29.2K reputationPosted May 17, 2012, 2:12 AM EDT
list = list.Distinct().ToList();
Glenn PattonRank #6,159 · 275 reputationPosted May 17, 2012, 2:27 AM EDT
Glenn PattonRank #6,159 · 275 reputationPosted May 17, 2012, 2:50 AM EDT
Glenn PattonRank #6,159 · 275 reputationPosted May 17, 2012, 3:49 AM EDT
That appears to do the required further testing is on going! Thanks for the links Vulpes!