This is probably a dumb question, but I cannot seem to figure it out. I am comparing the LastWriteTime of two files, however it is always failing because the file I download
TimeSpan difference = dtNew - dtOrig; if (difference >= TimeSpan.FromSeconds(1)) { ... }
Create a new DateTime value with the milliseconds component set to 0:
dt = dt.AddMilliseconds(-dt.Millisecond);