
I'm having problem figuring out how to hide overridden virtual members in the Syntax Editor code-completion of C# classes using the EditorBrowsable attribute. I'm trying to hide common members like Equals, GetHashCode and ToString using the following methodology:
public class BaseClass
{
public BaseClass() {}
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public override bool Equals(object obj) { return base.Equals(obj); }
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public override int GetHashCode() { return base.GetHashCode(); }
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public override string ToString() { return base.ToString(); }
}
public class DerivedClass : BaseClass
{
public BaseClass() {}
}
It doesn't matter if I instanciate the DerivedClass or the BaseClass, the code-completion shows Equals, GetHashCode and ToString in any case.
This methodology is fairly common in different editors (including the Visual Studio editor) and I would expect it work the same way in the Actipro Syntax Editor as well.
Is this a bug or is there some other way to be able to hide overridden virtual members?