Did you know… You can mark methods and types as Hidden, so they don’t appear in Intellisense or in the Object Browser? – #216

Today’s tip is a continuation from yesterday’s tip which talked about how to hide or show hidden members and types in the Object Browser.  So today’s tip is how to actually make something hidden or hidable.

In the System.ComponentModel namespace, there’s the EditorBrowseableAttribute class.

Going back to yesterday’s foo() and bar() methods, you’ll see in the below example how the foo() doesn’t appear in Intellisense, just like it doesn’t appear in the Object Browser.

Method foo() doesn't appear in intellisense

Of course, you can still complete the line above with foo(), and everything will compile successfully.

Technorati Tags: VS2005Tip,VS2008Tip

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>