Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I see the hex values of a string in a VS2008 watch window?

I have a string in a watch window in VS2008 and want to see the hex representation of each character. If I right click there's a hexadecimal option but this doesn't appear to do anything. Anybody know how to view the string as a series of hex values?

like image 593
Guy Avatar asked Oct 08 '08 22:10

Guy


1 Answers

Add your string as a watch, then edit the watch expression and append ".ToCharArray()" to view it as an array of chars. When you expand your watch you will see char code next to each individual char. Checking "Hexadecimal display" will show you hex codes for each character.

like image 77
Marko Dumic Avatar answered Sep 20 '22 19:09

Marko Dumic