Ray wrote a post entitled "Psychic Debuggin: IP on heap", where he talks about somebody being amazed at his abilities to debug something immediately.

Which brought something to mind (which I hope I haven't written about before (I did a quick search and didn't find anything ))

Perhaps 4 or 5 times, I've come across the following question:

I'm implementing an add-in architecture for my application. I'm able to load the add-in assembly and create an instance of a type, but I get an exception when I try to cast it to an interface.

The answer - and it's *always* been this answer for me - is the following (highlight to view):

You have the interface defined in your main program and in the add-in, and the assembly is part of the type's identity, so the two interfaces are not the same type.

Which is really obvious when you've come across it a couple times, but there is a certain degree of satisfaction to be able to diagnose it correctly from afar.

Do you have any examples of psychic debugging?