if (fbFolderBrowser.ShowDialog() == DialogResult.OK)
{
LastSelectedFolder = fbFolderBrowser.SelectedPath;
originalFiles = Directory.GetFiles(fbFolderBrowser.SelectedPath).Where(file => !file.EndsWith(".db")).ToArray();
//lower casing the extensions here.
foreach (string file in originalFiles)
{
File.Move(file, Path.ChangeExtension(file, Path.GetExtension(file).ToLower()));
}
//after im done changing the files to lower case, do I need to repopulate the array with the lowered case file names?
originalFiles = Directory.GetFiles(fbFolderBrowser.SelectedPath).Where(file => !file.EndsWith(".db")).ToArray();
}
在我浏览文件夹中的每个文件并确保扩展名是小写之后,我是否需要像上面那样用小写名称重新填充数组(在本例中为 originalFiles)?