How can I protect my code against decompilation?
Many people have intellectual property concerns about .NET, because it’s easy to decompile IL into C# or VB.NET, and the code produced is often remarkably similar to the original source. Personally I feel that most of the time these concerns are misplaced. If your application becomes sufficiently popular that people are decompiling it, chances are you’re making significant money from it anyway. If you’re worried about your algorithsm themselves being poached, I believe that the overall design of an application or architecture is usually more valuable than a specific algorithm. If you’re concerned about the security of private keys (or whatever) which are in your code, you’re relying on security through obscurity to start with, which is never a good idea. Valid IL can always be decompiled to some extent, and modifying it so that it’s no longer the kind of IL which is “naturally” produced by the C# or VB.NET compilers is likely to have a negative performance impact as the JIT will have b