C# List sorting

DirectoryInfo dir = new DirectoryInfo(@"C:\temp");
List<FileInfo> files = new List<FileInfo>(dir.GetFiles());
files.Sort((x, y) => DateTime.Compare(x.LastWriteTime,y.LastWriteTime));

Comments

Popular posts from this blog

Tibco Rendezvous (tibrv) C# .Net example

Parse XML to dynamic object in C#