clipped from: www.clariusconsulting.net   

How to hide System.Object members from your interfaces


image

A much cleaner intellisense is possible though:


image

The trick comes from the System.ComponentModel.EditorBrowsableAttribute, which controls visibility of members in VS intellisense. To hide a member from intellisense, you apply the following attribute to it:


[EditorBrowsable(EditorBrowsableState.Never)]

    [EditorBrowsable(EditorBrowsableState.Never)]
    public interface IHideObjectMembers
    {
        [EditorBrowsable(EditorBrowsableState.Never)]
        Type GetType();

        [EditorBrowsable(EditorBrowsableState.Never)]
        int GetHashCode();

        [EditorBrowsable(EditorBrowsableState.Never)]
        string ToString();

        [EditorBrowsable(EditorBrowsableState.Never)]
        bool Equals(object obj);
    }

public interface IVerifies : IHideObjectMembers

Sometimes I do love VS :)