I have base class which implemented IClientValidatable
<p>I have base class(<code>CompareAttribute</code>) which implemented <code>IClientValidatable</code></p>

<pre><code>[AttributeUsage(AttributeTargets.Property)]
public class NotContainsAttribute : CompareAttribute
{
}
</code></pre>

<p>I want to override method <code>IEnumerable&lt;ModelClientValidationRule&gt; GetClientValidationRules</code></p>

<p>but i can't do that because it is not virtual(<code>cannot override inherited member, because it is not marked virtual, abstract, or override</code>).</p>

<p>So i just declare my own method in my <code>NotContainsAttribute</code> class</p>

<pre><code>public new IEnumerable&lt;ModelClientValidationRule&gt; GetClientValidationRules(ModelMetadata metadata, ControllerContext context)
{
}
</code></pre>

<p>After i run the program all working like expected but i get warning in compile time that my class hides inherited member, (<code>Warning "NotContainsAttribute" hides inherited member Use the new keyword if hiding was intended.</code>)</p>

<p>But if I use <code>new</code> keyword</p>

<pre><code>public new IEnumerable&lt;ModelClientValidationRule&gt; GetClientValidationRules(ModelMetadata metadata, ControllerContext context)
        {
            yield return new ModelClientValidationNotContains (this.FormatErrorMessage(metadata.GetDisplayName()), CompareAttribute.FormatPropertyForClientValidation(this.OtherProperty));            
            yield break;
        }
</code></pre>

<p>In such case my method not used, base class method used instead.</p>

<p>I want my method to be used, without <code>new</code> keyword i get it used but why compiler saying that i need to use <code>new</code> keyword <code>if hiding was intended</code>?</p>

<p>I understand that <code>if hiding was intended</code> means that <code>if you want to hide base method and use your method insteard mark it with new keyword</code> but on practice it is really hiding my method.</p>

<p>May be some one may clarify that and is it good practice to declare method with the same name if that method in base class not allowed to be overridden but really you need to override it?</p>
