title: Directory.GetFiles of certain extension
body: <p>Is there a way to simplify this linq expression, or is there a better way of doing this?</p>
  
  <pre><code>Directory.GetFiles(dir, "*.*", SearchOption.AllDirectories)
           .Where(s =&gt; s.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) ||
                       s.EndsWith(".gif", StringComparison.OrdinalIgnoreCase) ||
                       s.EndsWith(".png", StringComparison.OrdinalIgnoreCase) ||
                       ...);
  </code></pre>
  
  <p>Basically I want to return all files of a certain extension. Unfortunately, this method isn't very flexible. I'd rather be able to add extensions to a list and have Directory.GetFiles return those extensions. Is that possible?</p>