IntelliSense question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kimmo Laine

    IntelliSense question

    Hi,

    is there a way to hide inherited methods from the IntelliSense-menu in
    VS2005?

    Lets say that i have the following:

    internal class MyClass {
    public const int MAX_COUNT = 10;
    }

    When i write in the ditor "MyClass." menu pops up with the following items

    Equals
    MAX_COUNT
    ReferenceEquals

    Is there a way to hide the Equals and ReferenceEquals , by using some
    attribute or something?


    thx
    Kimmo


  • Dave Sexton

    #2
    Re: IntelliSense question

    Hi Kimmo,

    The following works as long as MyClass is declared in another project. i.e.,
    Intellisense seems to ignore EditorBrowsable Attribute on classes within the
    current project, but it works when using a class from an external assembly.

    public class MyClass
    {
    [System.Componen tModel.EditorBr owsable(EditorB rowsableState.N ever)]
    public static new bool Equals(object objA, object objB)
    {
    return Object.Equals(o bjA, objB);
    }

    [System.Componen tModel.EditorBr owsable(EditorB rowsableState.N ever)]
    public static new bool ReferenceEquals (object objA, object objB)
    {
    return Object.Referenc eEquals(objA, objB);
    }

    public const int MAX_COUNT = 10;
    }


    I'm not sure how important it is that you keep MyClass internal, but that
    wouldn't work in this scenario.

    --
    Dave Sexton

    "Kimmo Laine" <reply.to@newsg roup.onlywrote in message
    news:erVXUVD%23 GHA.3456@TK2MSF TNGP02.phx.gbl. ..
    Hi,
    >
    is there a way to hide inherited methods from the IntelliSense-menu in
    VS2005?
    >
    Lets say that i have the following:
    >
    internal class MyClass {
    public const int MAX_COUNT = 10;
    }
    >
    When i write in the ditor "MyClass." menu pops up with the following items
    >
    Equals
    MAX_COUNT
    ReferenceEquals
    >
    Is there a way to hide the Equals and ReferenceEquals , by using some
    attribute or something?
    >
    >
    thx
    Kimmo
    >

    Comment

    Working...