I am starting with C# programming. I would like to ask you for help. I have a list of files from one directory. I would like to sort these files by date of creation/modification.
part of code:
List<string> _f = new List<string>();
string[] _files = Directory.GetFiles(_p);
foreach (string _fi in _files){_f.Add(_fi);};
_f.Sort((x, y) => DateTime.Compare(x.Created, y.Created))
Problem is that ".Created" does not exist. I was not able to find any relevant parameter which can be used to sort by DateTime. Could you help me please? Thank you in advance.