I am developing a window service in which i am downloading some files from a server according to the date and as soon as date changes I want the variables to be reset to the default values.
I am trying to do like this:
if (DateTime.Now.ToString("HHmmsstt").Contains("000000AM"))
{
reset variables
}
I am having a variable which counts the no. of files I dowloaded in a day. Now as soon as date changes, i want this variable to be reset to 0. So I applied this condition but this do not work as it is not necessary that when i am comparing ,time is 12 o clock