DebuggerDisplayAttribute Constructor

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Initializes a new instance of the DebuggerDisplayAttribute class.

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

Syntax

'Declaration
Public Sub New ( _
    value As String _
)
public DebuggerDisplayAttribute(
    string value
)
public:
DebuggerDisplayAttribute(
    String^ value
)
new : 
        value:string -> DebuggerDisplayAttribute
public function DebuggerDisplayAttribute(
    value : String
)

Parameters

  • value
    Type: System. . :: . .String
    The string to be displayed in the value column for instances of the type; an empty string ("") causes the value column to be hidden.

Remarks

The value parameter can contain braces ({ and }). The text within a pair of braces is evaluated as the name of a field, property, or method. For example, the following C# code causes "Count = 4" to be displayed when the plus sign (+) is selected to expand the debugger display for an instance of MyTable.

[DebuggerDisplay("Count = {count}")]
class MyTable
{
    public int count = 4;
}

.NET Framework Security

See Also

Reference

DebuggerDisplayAttribute Class

System.Diagnostics Namespace