title: Does LINQ to objects stop processing Any() when condition is true?
body: <p>Consider the following:</p>
  
  <pre><code>bool invalidChildren = this.Children.Any(c =&gt; !c.IsValid());
  </code></pre>
  
  <p>This class has a collection of child objects that have an <code>IsValid()</code> method. Suppose that the <code>IsValid()</code> method is a processor intensive task. After encountering the first child object where <code>IsValid()</code> is <code>false</code>, theoretically processing can stop because the result can never become true. Does LINQ to objects actually stop evaluating after the first <code>IsValid() = false</code> (like a logical AND) or does it continue evaluating all child objects?</p>
  
  <p>Obviously I could just put this in a foreach loop and break on the first invalid result, but I was just wondering if LINQ to objects is smart enough to do this as well.</p>
  
  <p><strong>EDIT:</strong>
  Thanks for the answers, for some reason I didn't think to look it up on MSDN myself.</p>