public class MyWebControl {
[ExternallyVisible]
public string StyleString {get;set;}
}
public class SmarterWebControl : MyWebControl {
[ExternallyVisible]
public string CssName{get;set;}
new public string StyleString {get;set;} //Doesn't work
}
Is it possible to remove the attribute in the subclass? I do want the attribute to get inherited by other subclasses, just not this one.
Edit: Whoops, looks like I forgot to compile or something because the code as posted above does, in fact, work!
It works for me.
Test code: