Yes.
But...
And it's a fairly big "but" - it's never that difficult to get round, if people want to, unless you do an online check. Changing the system date (for example) is pretty easy, and will fool basic systems.
It depends how much you want to protect your code, and how much effort you want to put in (and how much you want to risk annoying potential customers)
Google can help you here (try "demo version c#" - that will give you a large set of useful results), or see here:
Application Trial Maker[
^]