title: incompatible anonymous function signature in C#?
body: <p>I want to create an extension method which I can invoke on an object .</p>
  
  <p>The return value will be defined by a function.</p>
  
  <p>Something like this :  ( <em>this is just an example</em> )</p>
  
  <pre><code>bool isMature= thePerson.Age.Apply&lt;bool&gt;(d =&gt;   {    if (d &gt;18) return true;
                                                          return false;
                                                   })
  </code></pre>
  
  <p>and here is the extension method : </p>
  
  <pre><code>  public static Tout Apply&lt;Tout&gt;(this Object obj, Func&lt; Tout&gt; f)  
          {
  
              return f( );
          }
  </code></pre>
  
  <p>The error : <em>incompatible anonymous function signature</em></p>
  
  <p>What am I doing wrong ? </p>