I'm trying to get the last modified date of a file in Windows 7 - I just edited it, so in the properties, the Last Modified value is listed as 11/30/2013 4:55 PM
.
However, when I access the file using:
DateTime lastMod = File.GetLastWriteTime(file);
I output the value:
MessageBox.Show(lastMod.toString());
This always gives 12/31/1600 6:00:00 PM
, regardless of which file I'm working with, regardless of creation time, modification time, etc.
GetLastWriteTime
designed to return a "default" value like that, rather than throw an exception? – Bacciform