title: LINQ where vs takewhile
body: <p>I want to get a difference between <a href="https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.takewhile?view=netcore-3.1" rel="noreferrer"><code>TakeWhile</code></a> &amp; <a href="https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.where?view=netcore-3.1" rel="noreferrer"><code>Where</code></a> LINQ methods .I got the following data from MSDN .But It didn't make sense to me</p>
  <blockquote>
  <pre><code>Where&lt;TSource&gt;(IEnumerable&lt;TSource&gt;, Func&lt;TSource, Boolean&gt;) 
  </code></pre>
  <p>Filters a sequence of values based on a predicate.</p>
  </blockquote>
  <blockquote>
  <pre><code>TakeWhile&lt;TSource&gt;(IEnumerable&lt;TSource&gt;, Func&lt;TSource, Boolean&gt;)
  </code></pre>
  <p>Returns elements from a sequence as long as a specified condition is true.</p>
  </blockquote>
  <p>All opinions are welcomed.</p>