I\'d like to use the LINQ TakeWhile function on LINQ to Objects. However, I also need to know the first element that \"broke\" the function, i.e. the first elem
LINQ to Objects doesn't have such an operator. But it's straightforward to implement a TakeUntil extension yourself. Here's one such implementation from moreLinq.