Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi i create a dll that contain mostly use method .. (with class library in c#)
now i want to sell it ...
i worry for copy/paste by end-users

is there any method or application(free) to protect the dll ?

thanks
Posted

1 solution

Hi,

If you are going to use the class library in only your projects, then
declare a private variable with in the class and create a method with
argument to pass your password to be called after creating the object
of the class. If the password matches change the value of the variable
and when ever any method is called of the class check the value for the
variable and raise error accordingly.
 
Share this answer
 
Comments
P.Gnanaraj 16-Nov-17 8:36am    
Could you please tell how you have done licensing in you DLL?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900