What is the syntax for setting multiple file-extensions as searchPattern
on Directory.GetFiles()
? For example filtering out files with .aspx and .ascx extensions.
// TODO: Set the string 'searchPattern' to only get files with
// the extension '.aspx' and '.ascx'.
var filteredFiles = Directory.GetFiles(path, searchPattern);
Update: LINQ is not an option, it has to be a searchPattern
passed into GetFiles
, as specified in the question.