title: How to run a void if went to the next day C#
body: <p>I am using Visual Studio 2012 to write a software in C#. I want to know how my software will do something everytime the time went to next day. (I want to delete all row in a table run by MySql in the next day)</p>
  
  <p>My way is storing the date in a variable <code>X</code> when start the program, and use a timer to check every 1 min, <code>if DateTime.Now.ToString("dd") != X</code>, call the function. But I hope there is a better way to do it. </p>
  
  <p>Thank you!</p>