Differences
This shows you the differences between the selected revisions of the page.
| 2020-12-25 | 2021-03-05 | ||
| automatically using target article title for link anchor (martin) | vb.net snippet (martin) | ||
| Line 130: | Line 130: | ||
| } | } | ||
| } | } | ||
| + | </code> | ||
| + | |||
| + | ==== [[vbnet]] VB.NET ==== | ||
| + | |||
| + | The following snippet selects the most recent file from a directory listing. Most of the remaining code should be trivial to translate from the above C# example. | ||
| + | |||
| + | <code vbnet> | ||
| + | Dim latest As RemoteFileInfo = | ||
| + | directoryInfo.Files _ | ||
| + | .Where(Function(file) Not file.IsDirectory) _ | ||
| + | .OrderByDescending(Function(file) file.LastWriteTime) _ | ||
| + | .FirstOrDefault() | ||
| </code> | </code> | ||