Check out example codes for "How to set an expiry date on a program". It will help you in understanding the concepts better.

Code Example 1

if (DateTime.Now >= new DateTime(2020, 12, 31))
{
MessageBox.Show("Program Expired - Contact Administrator", "Program Name", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}

Learn ReactJs, React Native from akashmittal.com