c# - Can string formatting be used in text shown with DebuggerDisplay? -


I want to apply the debugger display / code> to include a memory address value. Is there a way to display hexadecimal in

 ? [DebuggerDisplay ("Foo: {} Address Address is value")] square fu {System.IntPtr m_Address = new System.IntPtr (43981); // Sample Value System.IntPtr Address {get {return m_Address; }}}  

It will be displayed: Foo: the address value is 43981 Instead, I want to display this value in hex like: FU: The address value is 0xABCD

I know that I can apply all types of formatting by overriding toString () , but if I'm curious about the same.

Yes you can use any of the ways to turn off the properties, as you normally would [DebuggerDisplay (": {{LT; formatting & gt; \ Foo address value is Address.ToString (\"} "is")] is an example


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -