[Browsable(false)] +C#

the keyword "[Browsable(false)]", what is mean in C# and how i can use it
MKItaniAsked:
Who is Participating?
 
oxyooCommented:
Sorry, forgot to hit the attach button for the code... here's the example:
using System.ComponentModel;


public class Bar {

  [Browsable(true)]
  public int Foo {
    get { /* Insert code here */ }
    set { /* Insert code here */ }
  }

}

Open in new window

0
 
oxyooCommented:
It is an Attribute, and determines if the property it is set on is visible in Visual Studios property window.

Browsable Attribute: http://msdn.microsoft.com/en-us/library/system.componentmodel.browsableattribute.aspx


Good Luck!

0
 
oxyooCommented:
It is of course not only applicable on properties but events too.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.