There are built-in tools for licensing and copy protection in Visual Studio or .Net. You need to develop your own scheme or use a ready made one.
For best practices and tips, see this article : 8 Ways To Make Your Software Hacker-Proof and Crack-Proof With CryptoLicensing
DISCLAIMER: I work at LogicNP Software, the developers of CryptoLicensing