title: Need to inspect the values of a delegate method
body: <p>I have a need to pass a delegate method with a varying number and type of parameters to another method.  My hope is to be able to inspect the values of the parameters within the call.</p>
  
  <p>This is my generic cache class.</p>
  
  <pre><code>public T Get&lt;T&gt;(Expression&lt;Func&lt;T&gt;&gt; getItemCallback) where T : class
  {
  
      T item = HttpRuntime.Cache.Get(hashRepresentationOfValues) as T;
      if (item == null)
      {
          item = getItemCallback.Compile()();
          HttpRuntime.Cache.Insert(
              hashRepresentationOfValues,
              item,
              null,
              DateTime.Now.AddMinutes(5),
              TimeSpan.Zero);
      }
      return item;
   }
  </code></pre>
  
  <p>My calls look like the following:</p>
  
  <pre><code>private DataContext db;
  return cache.Get&lt;List&lt;SomeDBObject&gt;&gt;(
      () =&gt; db.SomeDBObjectCall(param1, param2, param3));
  </code></pre>
  
  <p>As you can see it would be extremely helpful if I could dynamically determine the values of the delegate call as they could be used as the cache-key.</p>