Background Worker Check For When It's Midnight?

Posted by Soo on Stack Overflow See other posts from Stack Overflow or by Soo
Published on 2010-06-16T13:34:27Z Indexed on 2010/06/16 13:42 UTC
Read the original article Hit count: 218

Filed under:
|
|

I want to create a background worker for a WinForm that triggers code whenever midnight rolls by.

I have an idea of how to do it, but I'm pretty sure it's not the best way to do it.

while(1==1)
{
//if Datetime.Now == midnight, execute code
//sleep(1second)
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms