title: Passing a Function (with parameters) as a parameter?
body: <p>I want to create a generic to which I can pass a function as a parameter, however this function may include parameters itself so...</p>
  
  <pre><code>int foo = GetCachedValue("LastFoo", methodToGetFoo)
  </code></pre>
  
  <p>Such that:</p>
  
  <pre><code>protected int methodToGetFoo(DateTime today)
  { return 2; // example only }
  </code></pre>
  
  <p>Essentially I want to have a method that will check the cache for a value, otherwise will generate the value based on the passed in method.</p>
  
  <p>Thoughts?</p>