DebuggerBrowsableAttributeとは? わかりやすく解説

DebuggerBrowsableAttribute クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

デバッガ変数ウィンドウ内でメンバを表示するかどうかと、表示方法を決定します。このクラスは継承できません。

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

<ComVisibleAttribute(True)> _
<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field,
 AllowMultiple:=False)> _
Public NotInheritable Class
 DebuggerBrowsableAttribute
    Inherits Attribute
Dim instance As DebuggerBrowsableAttribute
[ComVisibleAttribute(true)] 
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple=false)]
 
public sealed class DebuggerBrowsableAttribute
 : Attribute
[ComVisibleAttribute(true)] 
[AttributeUsageAttribute(AttributeTargets::Property|AttributeTargets::Field, AllowMultiple=false)]
 
public ref class DebuggerBrowsableAttribute
 sealed : public Attribute
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field,
 AllowMultiple=false) */ 
public final class DebuggerBrowsableAttribute
 extends Attribute
ComVisibleAttribute(true) 
AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple=false)
 
public final class DebuggerBrowsableAttribute
 extends Attribute
解説解説
メモメモ

.NET Framework Version 2.0 では、Visual Basic で DebuggerBrowsableAttribute クラスがサポートされません。C# を使用すると、DebuggerTypeProxyAttribute、DebuggerDisplayAttribute、および DebuggerBrowsableAttribute を使用したカスタム データの拡張を追加できます。Visual Basic では DebuggerDisplayAttribute 属性がサポートされますが、DebuggerBrowsableAttribute 属性はサポートされません。

この属性は、単一インスタンスとしてプロパティおよびフィールドだけに適用できます。アセンブリには適用できません。

この属性のコンストラクタは、DebuggerBrowsableState 列挙体の値の 1 つを使用します。その値は次の状態のいずれかを指定します。

この属性と、DebuggerDisplayAttribute 属性、および DebuggerTypeProxyAttribute 属性の使用例については、DebuggerDisplayAttribute クラスのトピックで取り上げている例を参照してください。

継承階層継承階層
System.Object
   System.Attribute
    System.Diagnostics.DebuggerBrowsableAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

DebuggerBrowsableAttribute コンストラクタ

メモ : このコンストラクタは、.NET Framework version 2.0 で新しく追加されたものです。

DebuggerBrowsableAttribute クラスの新しいインスタンスを初期化します。

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

Public Sub New ( _
    state As DebuggerBrowsableState _
)
Dim state As DebuggerBrowsableState

Dim instance As New DebuggerBrowsableAttribute(state)
public DebuggerBrowsableAttribute (
    DebuggerBrowsableState state
)
public:
DebuggerBrowsableAttribute (
    DebuggerBrowsableState state
)
public DebuggerBrowsableAttribute (
    DebuggerBrowsableState state
)
public function DebuggerBrowsableAttribute
 (
    state : DebuggerBrowsableState
)

パラメータ

state

メンバを表示する方法を指定する DebuggerBrowsableState 値の 1 つ。

例外例外
例外の種類条件

ArgumentOutOfRangeException

state が DebuggerBrowsableState 値ではありません。

解説解説

この属性を適用できるのはプロパティおよびフィールドだけです。

使用例使用例

DebuggerBrowsableAttribute 属性を使用し、Keys プロパティのルート (プロパティ名) ではなく Keys が取得する配列の要素を表示するようにデバッガに命令するコード例を次に示します。このコード例は、DebuggerDisplayAttribute クラスのトピックで取り上げているコード例の一部分です。

[DebuggerBrowsableAttribute(DebuggerBrowsableState.RootHidden)]
public KeyValuePairs[] Keys
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DebuggerBrowsableAttribute クラス
DebuggerBrowsableAttribute メンバ
System.Diagnostics 名前空間

DebuggerBrowsableAttribute プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ State 属性の表示状態を取得します。
パブリック プロパティ TypeId  派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 ( Attribute から継承されます。)
参照参照

関連項目

DebuggerBrowsableAttribute クラス
System.Diagnostics 名前空間
DebuggerBrowsableState

その他の技術情報

デバッガ表示属性によるデバッグ機能の拡張

DebuggerBrowsableAttribute メソッド


パブリック メソッドパブリック メソッド

  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 ( Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスのハッシュ コードを返します。 ( Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 ( Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 ( Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 ( Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
参照参照

関連項目

DebuggerBrowsableAttribute クラス
System.Diagnostics 名前空間
DebuggerBrowsableState

その他の技術情報

デバッガ表示属性によるデバッグ機能の拡張

DebuggerBrowsableAttribute メンバ

デバッガ変数ウィンドウ内でメンバを表示するかどうかと、表示方法を決定します。このクラスは継承できません。

DebuggerBrowsableAttribute データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド DebuggerBrowsableAttribute DebuggerBrowsableAttribute クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ State 属性の表示状態を取得します。
パブリック プロパティ TypeId  派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。(Attribute から継承されます。)
パブリック メソッドパブリック メソッド
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 (Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 (Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスのハッシュ コードを返します。 (Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 (Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 (Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
参照参照

関連項目

DebuggerBrowsableAttribute クラス
System.Diagnostics 名前空間
DebuggerBrowsableState

その他の技術情報

デバッガ表示属性によるデバッグ機能の拡張



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「DebuggerBrowsableAttribute」の関連用語

DebuggerBrowsableAttributeのお隣キーワード

   

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



DebuggerBrowsableAttributeのページの著作権

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

©2026 GRAS Group, Inc.RSS