title: Foreach on IEnumerable<> with if condition
body: <p>I have the following code :</p>
  
  <pre><code>IEnumerable&lt;Vehicles&gt; Vehicles;
  
  for (int count = 0; count &lt; Vehicles.Count(); count++)
  {
      if (Vehicles.ElementAt(count).Mode)
      {
  
      }
  }
  </code></pre>
  
  <p>How can i implement Lambda expression foreach with if condition also?</p>
  
  <p>I tried this :</p>
  
  <pre><code>Vehicles.ToList().ForEach(i=&gt;i.Mode)
  </code></pre>
  
  <p>And struck with this since I dont know how to check conditions since intellisense not showing where clause as well. any help much appreciated. And I would like to use the count value inside looping as well....</p>