Export (0) Print
Expand All

BrowsableAttribute.BrowsableAttribute Constructor

Initializes a new instance of the BrowsableAttribute class.

Namespace: System.ComponentModel
Assembly: System (in system.dll)

public BrowsableAttribute (
	bool browsable
)
public BrowsableAttribute (
	boolean browsable
)
public function BrowsableAttribute (
	browsable : boolean
)
Not applicable.

Parameters

browsable

true if a property or event can be modified at design time; otherwise, false. The default is true.

When you mark a property with the BrowsableAttribute constructor of the value true, the value of this attribute is set to the constant member Yes. For a property marked with the BrowsableAttribute constructor of the value false, the value is No. Therefore, when you want to check the value of this attribute in your code, you must specify the attribute as BrowsableAttribute.Yes or BrowsableAttribute.No.

The following example marks a property as browsable. This code creates a new BrowsableAttribute, sets its value to BrowsableAttribute.Yes, and binds it to the property.

[Browsable(true)]
 public int MyProperty {
    get {
       // Insert code here.
       return 0;
    }
    set {
       // Insert code here.
    }
 }
    

/** @attribute Browsable(true)
 */
/** @property 
 */
public int get_MyProperty()
{
    // Insert code here.
    return 0;
} //get_MyProperty

/** @property 
 */
public void set_MyProperty(int value)
{
    // Insert code here.
} //set_MyProperty

Browsable(true)
public function get MyProperty() : int {
      // Insert code here.
      return 0;
 }

 public function set MyProperty(value : int) {
 }
   

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft