views:

37

answers:

0

I would like to implement a custom debugger visualiser in vs2008 for a typical array as the standard one does not display the data as I would like it. However Visual Studio prevents doing this for arrays for security reasons. I seem to remember though reading about using a WeakReference as a wrapper object to get around this limitation.

So for starters I would like to show something simple (C# code):

bool[] arrayOfBools = new bool[] { true, false, true, true, false };

as "10110".

How could I do this using a WeakReference? Is there another way to do this?

For a longer array of bool types it would be useful to display them in a two dimensional grid say using a Uniform Grid layout control in WPF.