如何从 Windows Mobile 上的 C# 文件中获取修改日期?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1185378/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 10:18:43 来源:igfitidea点击:
How do I get modified date from file in C# on Windows Mobile?
提问by Gold
I make a file in PC, and I want to transfer it to a PPC(Windows Mobile).
我在 PC 上制作了一个文件,我想将它传输到PPC( Windows Mobile)。
How can I get the modified date of this file?
如何获取此文件的修改日期?
(I need it on Windows Mobile.)
(我在 Windows Mobile 上需要它。)
回答by Steve Guidi
FileInfo.LastWriteTime
and
FileInfo.LastWriteTimeUtc
should register this information.
回答by vapcguy
回答by raghu sathvara
Try This.
尝试这个。
FileInfo fileInfo = new FileInfo("path");
var created = fileInfo.CreationTime; //File Creation
var lastmodified = fileInfo.LastWriteTime;//File Modification