I make a file in PC, and I want to transfer it to a PPC (Windows Mobile).
How can I get the modified date of this file?
(I need it on Windows Mobile.)
Steve Guidi
FileInfo.LastWriteTime
and
FileInfo.LastWriteTimeUtc
should register this information.
string strFilePath = @"C:\myfile.txt";
DateTime lastModified = System.IO.File.GetLastWriteTime(strFilePath);
Reference: File.GetLastWriteTime
on MSDN.
raghu sathvara
Try This.
FileInfo fileInfo = new FileInfo("path");
var created = fileInfo.CreationTime; //File Creation
var lastmodified = fileInfo.LastWriteTime;//File Modification
来源:https://stackoverflow.com/questions/1185378/how-do-i-get-modified-date-from-file-in-c-sharp-on-windows-mobile