title: How fix AddressOf requires a relaxed conversation to the delegate error
body: <p>Sorry, this is a mix of C# and VB.Net</p>
  
  <p>I have a C# class with with 2 delegates:</p>
  
  <pre><code>public delegate string GetSettingDelegate(string key);
  public event GetSettingDelegate GetSettingEvent;
  
  public delegate void SetSettingDelegate(string key, string value);
  public event SetSettingDelegate SetSettingEvent;
  </code></pre>
  
  <p>In a VB class I add handlers to the event:</p>
  
  <pre><code>AddHandler _gisCtrl.SetSettingEvent, AddressOf SetSetting
  AddHandler _gisCtrl.GetSettingEvent, AddressOf GetSetting
  </code></pre>
  
  <p>When I try and remove the handlers:</p>
  
  <pre><code>RemoveHandler _gisCtrl.SetSettingEvent, AddressOf SetSetting
  RemoveHandler _gisCtrl.GetSettingEvent, AddressOf GetSetting
  </code></pre>
  
  <p>SetSetting is OK but GetSetting throws a warning:</p>
  
  <p>The AddressOf expression has no effect in this context because the method arguments to AddressOf requires a relaxed conversation to the delagate type of the event.</p>
  
  <p>Here are the methods</p>
  
  <pre><code>Private Sub SetSetting(ByVal key As String, ByVal value As String)
      KernMobileBusinessLayer.[Global].Settings.SetValue(key, value)
  End Sub
  
  Private Function GetSetting(ByVal key As String)
      Return KernMobileBusinessLayer.[Global].Settings.GetString(key)
  End Function
  </code></pre>
  
  <p>Any idea how to fix this and why it is thrown in the first place? The 2 delegates/events/methods look similar enough that I don't know why one is OK and one throws a warning.</p>