File's modification date in C#
I have to write an ap开发者_如何学Cplication, which will compare the modification date of two files. These files are Excel workbooks. The first file is located on a local drive and the second on a LAN network.
Any hints, how to write this app? There's no need to open these files, just to check the date from file attributes.
System.IO.FileInfo file1 = new System.IO.FileInfo(file1Name);
System.IO.FileInfo file2 = new System.IO.FileInfo(file2Name);
if(file1.LastWriteTime != file2.LastWriteTime)
//Do some stuff.
System.IO Namespace - FileInfo Class
精彩评论