Skip to content

Commit 39efebd

Browse files
authored
Merge pull request #14128 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/visualstudio-docs (branch main)
2 parents 79a7ff4 + 9f3c692 commit 39efebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/debugger/using-the-debuggerdisplay-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The <xref:System.Diagnostics.DebuggerDisplayAttribute> controls how an object, p
1818

1919
The `DebuggerDisplay` attribute has a single argument, which is a string to be displayed in the value column for instances of the type. This string can contain braces (`{` and `}`). Text within a pair of braces is evaluated as a field, property or method.
2020

21-
If a class has an overridden `ToString()` method, the debugger uses the overridden method instead of the default `{<typeName>}`. Thus, if you have overridden the `ToString()` method, the debugger uses the overridden method instead of the default `{<typeName>}`, and you do not have to use `DebuggerDisplay`. If you use both, the `DebuggerDisplay` attribute takes precedence over the overridden `ToString()` method. The `DebuggerDisplay` attribute also takes precedence over the overridden `ToString()` method in a subclass.
21+
If a class has an overridden `ToString()` method, the debugger uses the overridden method instead of the default `{<typeName>}`. In this case you do not have to use `DebuggerDisplay`. If you use both, the `DebuggerDisplay` attribute takes precedence over the overridden `ToString()` method. The `DebuggerDisplay` attribute also takes precedence over the overridden `ToString()` method in a subclass.
2222

2323
Whether the debugger evaluates this implicit `ToString()` call depends on a user setting in the **Tools / Options / Debugging** dialog box.
2424

0 commit comments

Comments
 (0)