I built a basic Windows Form app. I want to make it so that my program deletes itself after a date of my choosing.
Specifically, when someone clicks on the .exe to run it, and if it's after a certain date, the .exe is deleted. Is this possible? If yes, how do I do this?
I think my code would look something like this:
DateTime expiration = new DateTime(2013, 10, 31) //Oct. 31, 2013
If (DateTime.Today > expiration)
{
//command to self-delete
}
else
{
//proceed normally
}