This is something that you can do in several ways:
1. Indeed, by writing something in the registry, a cripted value that
contains the expiration date. If the date is > than that date in the
registry or the registry key does not exists you can disable/uninstall the
application
2. Making the same thing in a file.
But there's a problem in .Net, the reverse engineering, you cannot stop
anyone to reverse engineer your app and take out the validity check... With
an obfuscator you'll make this thing more difficult but still possible.
Another approach can be in using a small COM dll which embeds some
functionality (not only the validity check) to validate the app. Since COM's
are more difficult to reverse engineer it will be more secure. If you embed
some app functionality in it, it could not easily be replaced by one maked
by the cracker. But it is a good idea to avoid to combine .Net with