public static FileInfo FindFile(FileInfo[] fileInfoArray, string name)
{
foreach (FileInfo fi in fileInfoArray)
{
if (fi.Name == name)
return fi;
}
return null;
}
FileInfo fileInfo = fileInfoArray.First(fi => fi.Name =="myFileName.txt");
No comments:
Post a Comment