title: Event handler not removing itself?
body: <p>At the beginning of a VB .NET function I remove an event handler and add it again at the end of the function because the function's code would trigger those events and I do not want them to trigger for the duration of the function.  This usually works, but I have run into a few situations where the event still gets called even though I have already removed it.  Sometimes removing it twice at the beginning of the function fixes it, but other times no matter how many times I remove it, it still fires.  Any ideas on what could be causing this?</p>
  
  <p><em>Edit</em></p>
  
  <p>The code is in a Form that has a virtual mode datagridview.  I want to run some operations that will trigger the CellValueNeeded event for the datagridview without that event being fired (because it will interfere).</p>
  
  <pre><code>Public Sub DoEventRaisingStuff()
      RemoveHandler grid.CellValueNeeded, AddressOf grid_CellValueNeeded
  
      'Do things that would trigger CellValueNeeded
  
      AddHandler grid.CellValueNeeded, AddressOf grid_CellValueNeeded
  End Sub
  </code></pre>
  
  <p>Removing the handler multiple times does not prevent the event from firing, so it doesn't seem to be added multiple times somewhere else by accident.</p>
  
  <p>Is there a way to find out what event handlers are active?</p>