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
VulpesPosted May 17, 2012, 6:48 AM
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
Glenn PattonPosted May 17, 2012, 7:49 AM
That appears to do the required further testing is on going! Thanks for the links Vulpes!
Glenn PattonPosted May 17, 2012, 6:50 AM
Glenn PattonPosted May 17, 2012, 6:27 AM
VulpesPosted May 17, 2012, 6:12 AM
list = list.Distinct().ToList();