title: unique LINQ to filter list by variables (case insensitive)
body: <p>I have</p>
  
  <pre><code>public int practice_example6 (List&lt;Car&gt; cars)
  </code></pre>
  
  <p>I want to filter this list by <code>Make</code> that contains the word <code>"Toyota"</code> but not for that filter to be case sensitive. My other conditions are that <code>SuggestedRetailPrice</code> should be less than 30000.</p>
  
  <p>I think I'm almost there but am confused about how to handle the case insensitive issue.</p>
  
  <pre><code>if (cars == null)
  {
     return 0;
  }
  else
  {
     List&lt;Car&gt; filtered = cars.Where(x =&gt; x.Make == "honda").ToList();
     List&lt;Car&gt; filtered2 = cars.Where(x =&gt; x.Make == "Honda").ToList();
     List&lt;Car&gt; filtered3 = cars.Where(x =&gt; x.SuggestedRetailPrice &lt; 30000).ToList();
  }
  </code></pre>
  
  <p>I'm also not sure on how to return 3 variables (filtered1,2,3) in one return statement. Perhaps just combine those 3 into one variable and then return that?</p>
  
  <p>I'm a beginner and have researched about this. I would appreciate explanations not just fixes.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: I should not I have to do this without changing the function to IEnumerable practice_example6(List cars) - I know this would be ideal but there are constraints imposed.</p>