Closed
Description
The generated ToString() method of a message affects the state of the message.
Since the debugger calls to ToString() to show its data in the watches, it messes up with the state of the program.
Moreover, quoting from the ToString()
documents "Notes to Inheritors": https://learn.microsoft.com/en-us/dotnet/api/system.object.tostring
- Your
ToString()
override should have no observable side effects to avoid complications in debugging. For example, a call to theToString()
method should not change the value of instance fields.
Metadata
Metadata
Assignees
Labels
No labels