Check Directories in C# using Linq
Posted
by pm_2
on Stack Overflow
See other posts from Stack Overflow
or by pm_2
Published on 2010-06-10T12:28:50Z
Indexed on
2010/06/10
12:42 UTC
Read the original article
Hit count: 119
Can someone tell me what I'm doing wrong with the following Linq query? I'm trying to find the directory with the highest aphanumerical value.
DirectoryInfo[] diList = currentDirectory.GetDirectories();
var dirs = from eachDir in diList
orderby eachDir.FullName descending
select eachDir;
MessageBox.Show(dirs[0].FullName);
© Stack Overflow or respective owner