title: How to distinguish MethodBase in generics
body: <p>I have a cache based on </p>
  
  <pre><code>Dictionary&lt;MethodBase, string&gt;
  </code></pre>
  
  <p>The key is rendered from MethodBase.GetCurrentMethod. Everything worked fine until methods were explicitly declared. But one day it is appeared that:</p>
  
  <pre><code>Method1&lt;T&gt;(string value)
  </code></pre>
  
  <p>Makes same entry in Dictionary when T gets absolutely different types.</p>
  
  <p>So my question is about better way to cache value for generic methods. (Of course I can provide wrapper that provides GetCache and equality encountered generic types, but this way doesn't look elegant). </p>
  
  <p><strong>Update</strong>
  Here what I exactly want:</p>
  
  <pre><code>static Dictionary&lt;MethodBase, string&gt; cache = new Dictionary&lt;MethodBase, string&gt;();
  static void Method1&lt;T&gt;(T g) 
  {
      MethodBase m1 = MethodBase.GetCurrentMethod();
      cache[m1] = "m1:" + typeof(T);
  }
  public static void Main(string[] args)
  {
      Method1("qwe");
      Method1&lt;Stream&gt;(null);
      Console.WriteLine("===Here MUST be exactly 2 entry, but only 1 appears==");
      foreach(KeyValuePair&lt;MethodBase, string&gt; kv in cache)
          Console.WriteLine("{0}--{1}", kv.Key, kv.Value);
  }
  </code></pre>