c# - Exit my while loop at a specific day and time -


i have while loop continually processing information on weekend. on monday @ 8:00 process stop.

i have running inside while loop:

 datetime currentdate = datetime.now;  if (currentdate .dayofweek == dayofweek.monday)  {       runloop = false;  } 

this should correctly stop loop turns monday right?

how enable continue until 8:00 on monday morning?

it sounds me it's simple as:

datetime currentdate = datetime.now; if (currentdate.dayofweek == dayofweek.monday && currentdate.hour >= 8) {      runloop = false; } 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -