title: How to remove a method from an Action delegate in C#
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2051357/c-sharp-adding-and-removing-anonymous-event-handler">C# Adding and Removing Anonymous Event Handler</a>  </p>
  </blockquote>
  
  
  
  <p>suppose I have an Action delegate declared this way:</p>
  
  <pre><code>public event Action&lt;MenuTraverser.Actions&gt; menuAction;
  </code></pre>
  
  <p>I am associating a method to it this way:</p>
  
  <pre><code>menuInputController.menuAction += (MenuTraverser.Actions action) =&gt; this.traverser.OnMenuAction(action);
  </code></pre>
  
  <p>Now, all works fine, but in certain situation I need to remove the delegated method and I don't know how.
  I tried this way but doesn't work:</p>
  
  <pre><code>menuInputController.menuAction -= (MenuTraverser.Actions action) =&gt; this.traverser.OnMenuAction(action);
  </code></pre>
  
  <p>How can I do such a thing? I need that my method OnMenuAction will be no longer called.</p>