« Inventory of changes made to 2004/06/19 dasBlog codebase | Main | ICSharpCode.SharpZipLib access denied »

Viewing a byte[] array contents in a Visual Studio memory window

I haven’t found a good source of tips yet on how to make effective use of Visual Studio’s memory windows when working with C# objects, so here’s one that may work to view the contents of a byte[] array:

1.      Open the memory window.

2.      Type the name of the array in the address box, this will show you the memory occupied by the System.Array object corresponding to your byte[] array.

3.      Enter the first four byte values you see, in reverse order with a “0x” prefix, in the address box.

4.      Ignore the first two bytes, or add 2 to the address entered in step 3.

 

 

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)