BrowsableAttribute コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > BrowsableAttribute コンストラクタの意味・解説 

BrowsableAttribute コンストラクタ

BrowsableAttribute クラス新しインスタンス初期化します。

名前空間: System.ComponentModel
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    browsable As Boolean _
)
Dim browsable As Boolean

Dim instance As New BrowsableAttribute(browsable)
public BrowsableAttribute (
    bool browsable
)
public:
BrowsableAttribute (
    bool browsable
)
public BrowsableAttribute (
    boolean browsable
)
public function BrowsableAttribute (
    browsable : boolean
)

パラメータ

browsable

特定のプロパティまたはイベントデザイン時に変更できる場合trueそれ以外場合false既定値true です。

解説解説

trueBrowsableAttribute コンストラクタ使用してプロパティマークすると、この属性の値は定数メンバ Yes に設定されます。falseBrowsableAttribute コンストラクタ使用してマークされているプロパティ場合、値は No になります。したがってコード内でこの属性の値を確認する場合は、属性BrowsableAttribute.Yes または BrowsableAttribute.No として指定する必要があります

使用例使用例

プロパティ参照可能としてマークする例を次に示します。このコードは、新しBrowsableAttribute作成し、その値を BrowsableAttribute.Yes設定してから、その属性プロパティ関連付けます。

<Browsable(True)> _
Public Property MyProperty() As
 Integer
    Get
        ' Insert code here.
        Return 0
    End Get
    Set
        ' Insert code here.
    End Set
End Property
[Browsable(true)]
 public int MyProperty {
    get {
       // Insert code here.
       return 0;
    }
    set {
       // Insert code here.
    }
 }
    
   [Browsable(true)]
   int get()
   {
      // Insert code here.
      return 0;
   }
   void set( int value )
   {
      
      // 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) {
 }
   
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
BrowsableAttribute クラス
BrowsableAttribute メンバ
System.ComponentModel 名前空間
BrowsableAttribute クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「BrowsableAttribute コンストラクタ」の関連用語

BrowsableAttribute コンストラクタのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



BrowsableAttribute コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS