title: How to pass a predicate as parameter c#
body: <p>How can I pass a predicate into a method but also have it work if no predicate is passed?  I thought maybe something like this, but it doesn't seem to be correct.</p>
  
  <pre><code>private bool NoFilter() { return true; }
  
  private List&lt;thing&gt; GetItems(Predicate&lt;thing&gt; filter = new Predicate&lt;thing&gt;(NoFilter))
  {
      return rawList.Where(filter).ToList();
  }
  </code></pre>