This documentation is archived and is not being maintained.

DebuggerBrowsableAttribute.DebuggerBrowsableAttribute Constructor

Initializes a new instance of the DebuggerBrowsableAttribute class.

Namespace: System.Diagnostics
Assembly: mscorlib (in mscorlib.dll)

public DebuggerBrowsableAttribute (
	DebuggerBrowsableState state
public DebuggerBrowsableAttribute (
	DebuggerBrowsableState state
public function DebuggerBrowsableAttribute (
	state : DebuggerBrowsableState
Not applicable.



One of the DebuggerBrowsableState values that specifies how to display the member.

Exception typeCondition


state is not one of the DebuggerBrowsableState values.

This attribute can be applied only to properties and fields.

The following code example shows the use of a DebuggerBrowsableAttribute attribute to instruct the debugger to not display the root (property name) of the Keys property, but to display the elements of the array that Keys gets. This code example is part of a larger example provided for the DebuggerDisplayAttribute class.

public KeyValuePairs[] Keys

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