views:

37

answers:

1

In the olden times of .NET 1.1, I could use the SoapFormatter to find out exactly what was getting serialized when I copied an object into the clipboard.

Fast forward to 2010, and I tried to do the same trick. It turns out the SoapFormatter does not support generics. Is there an alternative way to find out exactly what binary objects are serialized into the clipboard?

For example lets say I have this class:

public class Foo
{
   public List<Goo> Children;
}

If I send an instance of it to the clipboard, I would like to take a look at what is in the clipboard to see if it's children list was included or not.

Update: I was finally able to find the over copied field with the debugger. Visual Studio did it's job.

+1  A: 

Not to be self-promoting here, but... ClipMate can do this. There's a hex view editor (turned off by default, enable in Tools | Options | Editor | Enable Binary View, the re-start the app) that can display any format. First, copy the data. Next, in ClipMate do and Edit | Capture Special. Turn on the formats that you're interested in, then ClipMate will copy those (and not just the simple formats that it would have already captured). Now you can see the hex dump in the preview/edit window.
EVEN THE TRIAL VERSION WILL DO THIS, and it's a full-featured, 30-days of actual use, eval period. I don't yet have a discount for SO users, but I'm thinking about it.

Chris Thornton
Thanks for the tip, I'll try it tomorrow.
Jake Pearson