I'm writing a WebPart, which means that I inherit from System.Web.UI.WebControls.WebParts.WebPart and I override protected override void CreateChildControls().
However, I'd like to make the class sealed if possible, but that gives two issues: Just sealing the class gives a warning "new protected member declared in sealed class".
Changing the Access Modifier from protected to private or internal gives a compiler error telling me I can't change the modifier when inheriting.
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 seems to work just fine, but the devil is usually in the details.
Edit: 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 protected. Thanks for the Pragma-Tip though!