title: ... hides inherited member ... Use the new keyword
body: <p>I got a weird warning that I don't understand.</p>
  
  <p>I have two <code>UserControls</code>. The first one <code>BaseControl</code> inherits from <code>Button</code> and the second <code>SecondControl</code> inherits from <code>BaseControl</code>.
  I didn't change anything so both UserControls are like VS2012 creates them (default constructor etc.) I only removed the <code>sealed</code> keyword of <code>BaseControl</code> in order to inherit it.</p>
  
  <p>Now if I build the project the following warning is put out:</p>
  
  <pre><code>'MyProject.Controls.SecondControl.Connect(int, object)' hides inherited member
  'MyProject.Controls.BaseControl.Connect(int, object).' Use the new keyword if hiding was intended.
  </code></pre>
  
  <p>When I click on this warning, VS2012 opens a file named <code>'SecondControl.g.cs'</code> and shows this:</p>
  
  <pre><code>partial class SecondControl: global::MyProject.Controls.BaseControl, global::Windows.UI.Xaml.Markup.IComponentConnector
  {
      [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  
      public void Connect(int connectionId, object target)
      {
          this._contentLoaded = true;
      }
  }
  </code></pre>
  
  <p>What does this mean? I don't have any method called <code>Connect()</code> except for this in <code>SecondControl.g.cs</code> but that is none of my methods.
  Any hint how to fix this? Even it is only a warning and my application works fine, I don't like to have any warnings/errors in the output window :)</p>
  
  <p>I found some articles about this error on SO but none of these helped me :(</p>
  
  <p>Edit: Adding the whole classes mentioned above.</p>
  
  <p>BaseControl:</p>
  
  <pre><code>namespace MyProject.Controls
  {
      public partial class BaseControl : Button
      {
          public BaseControl()
          {
              this.InitializeComponent();
          }
      }
  }
  </code></pre>
  
  <p>SecondControl:</p>
  
  <pre><code>namespace MyProject.Controls
  {
      public sealed partial class SecondControl: BaseControl
      {
          public SecondControl()
          {
              this.InitializeComponent();
          }
      }
  }
  </code></pre>
  
  <p>I checked the whole inheritance chain of Windows.UI.Xaml.Controls.Button and there is no Connect(int, object) or any other Connect(). I didn't add any Connect()-method too.</p>