title: protected members in a sealed class
body: <p>I'm writing a WebPart, which means that I inherit from <code>System.Web.UI.WebControls.WebParts.WebPart</code> and I override the method <code>protected override void CreateChildControls()</code>.</p>
  
  <p>However, I'd like to make the class <code>sealed</code> if possible, but that gives two issues: Just sealing the class gives a warning "new protected member declared in sealed class".</p>
  
  <p>Changing the access modifier from <code>protected</code> to <code>private</code> or <code>internal</code> gives a compiler error telling me I can't change the modifier when inheriting.</p>
  
  <p>That leaves me wondering: Is there any problem with sealing it and ignoring the warning? Or could this lead to any negative side effects further down the road? It <em>seems</em> to work just fine, but the devil is usually in the details.</p>
  
  <p><strong>Edit:</strong> I was just being stupid. The "new protected member" error was for a function that was indeed NOT overridden and just accidentially was declared as <code>protected</code>. Thanks for the Pragma-Tip though!</p>