about a year ago Microsoft bought a small Israeli Company called Secured Dimensions. They had an interesting solution to the problem of protecting your .NET code. Basically they would help you choose which parts of the code you'd like to protect and then run those parts of hte code in a special virtual machine encrypted environment (in memory).
Recently Microsoft released a set of products that seems to be based on SD's technology, and that's a good thing. There aren't many good solutions to protect .NET code. SD's solution is closer to protecting real IP as it gets as far as I can see.