title: Passing func from method parameter into a LINQ method (generic types)
body: <p>In the signature of a method I specify a Func, like so:</p>
  
  <pre><code>public void Method (Func&lt;string, bool&gt; func)
  </code></pre>
  
  <p>In LINQ, which method (from IEnumerable) will let me pass in a Func from the method parameter to the LINQ query? The other issue is, my func can have any type parameter(s) so the Method from IEnumerable/LINQ must support generic type placeholders.</p>
  
  <p>I want to write something like this:</p>
  
  <pre><code>// Get all elements of type T from the webpage (find is an object in an external API to look for elements in a page).
  
  IEnumerable&lt;T&gt; images = find.GetAllByTagName&lt;T&gt;().All(func);
  
  // Where func is a method parameter which is assigned at run time by the consumer of this API:
  
  public void Test (Func&lt;T, bool&gt; func) { }
  </code></pre>
  
  <p>How can I best do this? I am on .NET 3.5</p>
  
  <p>Thanks</p>