DebuggerDisplayAttribute

The DebuggerDisplayAttribute type is an attribute that controls how values are displayed in a debugger window. This attribute is valid for assembly, class, struct, enum, indexer, property, field, and delegate entities. You cannot use DebuggerDisplayAttribute on methods. When this attribute is used as an assembly-level attribute, the Target property must be assigned the name of the target type. The DebuggerDisplayAttribute type is found in the System.Diagnostics namespace.

The DebuggerDisplayAttribute type has a one-argument constructor. The single argument, which is a string, is the display value of the type in the Debug window. The value can contain an expression, which must be enclosed in curly braces: {expression}. Constants, ...

Get Programming Microsoft® Visual C#® 2008: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.