I have a complex class (MyClass) that has a ToString () function, the function returns a string representation of the string.
I would like the visual studio visualizer to use this function to display a variable
This is my visualizer,
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="MyClass">
<DisplayString>...</DisplayString>
</Type>
</AutoVisualizer>
If i use
...
<DisplayString>{ToString}</DisplayString>
...
The address of the function is returned, is it possible to display the result of the function?
If not, what would be the best way to display a string representation of a class?
source
share