This question already has an answer here:
how to create trial period setup file for 30 days of my c# windows application?
Making C# application a 30 day trial version
http://www.dotnetspider.com/forum/130150-Making-C-application-day-trial-version.aspx
How to add more functionality in setup file? - C#
One possible solution is to use the registry and write there in some key the installation date. This step is done in the installation time/ first time the application is in use. Then periodically check the current date against the installation date.
You can take also these references:
来源:https://stackoverflow.com/questions/3625825/how-can-i-make-my-application-have-a-30-day-trial-period