Reputation: 21
I have created a custom user control and build it into a DLL file, When I use it into another project as a user control, after occurring an exception, it's source appears and everyone can change and build it again for himself.
how can I lock or close my custom user control's source code?
Upvotes: 2
Views: 558
Reputation: 78447
I didn't understand from the question how throw exception reveals the source code.
However, there is not much you can do in order to completely hide your source code. As .NET assembly is contains IL code which can be always reverse-engineered quite easily with tools like Reflector.
The best thing you can do is to obfuscate the code. There are a bunch of different tools and obfuscation algorithm. Google for .NET obfuscator
and you pick the tool you like more.
You can find quite a few obfuscators listed here : http://msdn.microsoft.com/en-us/vcsharp/aa336818.
Upvotes: 1