开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜