I am looking for a good concrete example where it is clearly desirable to override ToString() with something, but to use a [DebuggerDisplay(...)] custom attribute to display something else in the debugger?
Say, for example, a Node object for a binary tree.
The ToString() would merely want to display the payload for that node, while the DebuggerDisplay would probably also show which nodes it was pointing to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With