BrowsableAttribute.Browsable BrowsableAttribute.Browsable BrowsableAttribute.Browsable BrowsableAttribute.Browsable Property

정의

찾아볼 수 있는 개체인지 여부를 나타내는 값을 가져옵니다.Gets a value indicating whether an object is browsable.

public:
 property bool Browsable { bool get(); };
public bool Browsable { get; }
member this.Browsable : bool
Public ReadOnly Property Browsable As Boolean

속성 값

검색 가능 개체이면 true이고, 그렇지 않으면 false입니다.true if the object is browsable; otherwise, false.

예제

다음 예제에서는 확인 하는지 여부를 MyProperty 을 검색할 수 있도록 합니다.The following example checks to see whether MyProperty is browsable. 먼저 코드에 대 한 특성을 가져옵니다 MyProperty 여:First the code gets the attributes for MyProperty by:

코드 설정 하 여 myAttribute 의 값에는 BrowsableAttributeAttributeCollection 속성 검색 가능한 지 여부를 확인 합니다.Then the code sets myAttribute to the value of the BrowsableAttribute in the AttributeCollection and checks whether the property is browsable.

// Gets the attributes for the property.
AttributeCollection^ attributes = TypeDescriptor::GetProperties( this )[ "MyProperty" ]->Attributes;

// Checks to see if the property is browsable.
BrowsableAttribute^ myAttribute = dynamic_cast<BrowsableAttribute^>(attributes[ BrowsableAttribute::typeid ]);
if ( myAttribute->Browsable )
{
   // Insert code here.
}
// Gets the attributes for the property.
 AttributeCollection attributes = 
    TypeDescriptor.GetProperties(this)["MyProperty"].Attributes;
 
 // Checks to see if the property is browsable.
 BrowsableAttribute myAttribute = (BrowsableAttribute)attributes[typeof(BrowsableAttribute)];
 if(myAttribute.Browsable) {
    // Insert code here.
 }
 
' Gets the attributes for the property.
Dim attributes As AttributeCollection = TypeDescriptor.GetProperties(Me)("MyProperty").Attributes

' Checks to see if the property is browsable.
Dim myAttribute As BrowsableAttribute = CType(attributes(GetType(BrowsableAttribute)), BrowsableAttribute)
If myAttribute.Browsable Then
    ' Insert code here.
End If 

적용 대상

추가 정보