views:

330

answers:

2

I remember I could add modifiers to a watched variable during debugging to make its display in different formats in Delphi. Such as "str,m" would display string in its binary representation.

Similarly I'd like to look at binary representation of a string to see character values for .NET applications on Visual Studio 2008. What's the easiest way of doing it?

Note: "Hexadecimal Display" option doesn't work on strings.

+1  A: 

If you just want a simple string representation then check out this.

MSDN: Enhancing Debugging with the Debugger Display Attributes

They use the following sample:

[DebuggerDisplay("Count = {count}")]
class MyHashtable
{
    public int count = 4;
}
bendewey