title: why delegate cannot add a listener with a reference in container
body: <p>I create an &lt;int,delegate&gt; dictionary and add a delegate object into the container.
  And try to add another listener method into that delegate which get the reference by TryGetValue method of Dicionary.
  The result shows that we cannot output the event handler 2, why?</p>
  <pre><code>class Program
  {
  
      public delegate void TestDelegate();
      static void Main(string[] args)
      {
          Dictionary&lt;int, TestDelegate&gt; delegates = new Dictionary&lt;int, TestDelegate&gt;();
          delegates.Add(1, () =&gt;
          {
              Console.WriteLine(&quot;event handler 1&quot;);
          });
          if (delegates.TryGetValue(1, out TestDelegate td))
          {
              Console.WriteLine($&quot;delegates same Reference {ReferenceEquals(td, delegates[1])}&quot;);
              td += () =&gt; Console.WriteLine(&quot;event handler 2&quot;);
          }
          delegates[1] += () =&gt; Console.WriteLine(&quot;event handler 3&quot;);
          if (delegates.TryGetValue(1, out TestDelegate td2))
          {
              td2.Invoke();
          }
      }
  }
  </code></pre>