I am trying to get latest excel files from a folder, and iterate those to write some text.
There are several files with the same modified date and time.
That is why I want to pull files as list type.
I use this
Directory.GetFiles("Path")).Select(Function(f) New FileInfo(f)).OrderByDescending(Function(b) b.LastWriteTime).ToList(0).ToString to get the latest files.
However when I assign a variable with above, I get an error:
How do I fix this?