Код: Выделить всё
List result = new List();
foreach (string file in Directory.EnumerateFiles(path,"*.*",
SearchOption.AllDirectories)
.Where(s => s.EndsWith(".mp3") || s.EndsWith(".wma")))
{
result.Add(file);
}
Код: Выделить всё
string[] extensions = { "*.mp3", "*.wma", "*.mp4", "*.wav" };
Буду признателен за любую помощь, поскольку время от времени программирую

Подробнее здесь: https://stackoverflow.com/questions/375 ... e-criteria