This question is very broad but the short answer is: it depends on your threat model. Since the application will have to decrypt the file to check its contents, the file will have to be on the client machine (along with a decryption key) so if someone wants to crack it, they'll have a field day with it. (They can just attach a debugger to your process and trace through the code that deals with protection and then just either patch your executable or figure out how to generate a valid license file. Among other possible approaches that I didn't even think of.)
If you're serious about protecting your software and you think your program will be so popular that many, many users will try to pirate it, buy a professional solution - you'll get professional advice on setting it up and the protection will likely have been tested already in other products.
If that's too expensive, re-evaluate whether you need copy protection or not. Most home-brewed schemes can be cracked in short order and they'll end up annoying your legitimate users and it may turn out to be a major headache for you. You'll have to support your protection scheme and keep it updated as your product evolves. Keeping licenses backward compatible while being user-friendly and hard(-ish)-to-crack is tricky.
A possible solution is to perform an over-the-internet license check but that has its own drawbacks and it's not cracker-proof either. If you're committed to rolling your own protection scheme, be ready to write a lot of complicated code, all in C or C++. (C# can be decompiled with free, open source tools.)
Before you do that, ask yourself: wouldn't your time be better spent on new features instead of licensing code that doesn't improve the application itself?