To view the Silverlight application, the client downloads an .xap file containing the dll and one xml configuration and optional resources. The dll contains compiled C # code that runs in the Silverlight runtime on the client machine. Silverlight runtime is basically a subset of the full .net runtime. Thus, the user receives the code in the dll, and then can use the tools to get the source code. Therefore, the most you can do is obfuscation. Still for very critical code, which should not be an option. You can use some other method (WCF or other web services to hide part of your code, maybe), if it shows your needs.
source
share