Running a simple LINQ query in parallel
问题 I'm still very new to LINQ and PLINQ. I generally just use loops and List.BinarySearch in a lot of cases, but I'm trying to get out of that mindset where I can. public class Staff { // ... public bool Matches(string searchString) { // ... } } Using "normal" LINQ - sorry, I'm unfamiliar with the terminology - I can do the following: var matchedStaff = from s in allStaff where s.Matches(searchString) select s; But I'd like to do this in parallel: var matchedStaff = allStaff.AsParallel().Select