这样的事情怎么样…
var directory = new DirectoryInfo("C:\MyDirectory");var myFile = (from f in directory.GetFiles() orderby f.LastWriteTime descending select f).First();// or...var myFile = directory.GetFiles() .OrderByDescending(f => f.LastWriteTime) .First();
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)