Passing a bool condition to method which I can invoke when I need
<p>I need to pass in a predicate which I can invoke whenever I want (just like a delegate). I am trying to do something like this (I thought Predicate delegate would meet my needs):</p>

<pre><code>MyMethod(Predicate,string&gt; pred);
</code></pre>

<p>Called like: <code>MyMethod(s =&gt; s.Length &gt; 5);</code></p>

<p>I want to write the condition inline BUT invoke it when I want, just like a delegate. How could I do this>?</p>

<p>Thanks</p>
