I am trying to get the text files from a certain directory and list them by date modified into a listBox. Here is my current code, but I have no idea how do order them by date modified.
DirectoryInfo di = new DirectoryInfo(@".\notes\");
foreach (FileInfo fi in di.GetFiles("*.txt"))
listBox1.Items.Add(fi.Name.Substring(0, fi.Name.Length - 4))