ไวยากรณ์สำหรับการตั้งค่าคืออะไรหลาย ๆ ไฟล์นามสกุลเป็นsearchPatternบนDirectory.GetFiles()? ยกตัวอย่างเช่นการกรองไฟล์ที่มีขอบและ.ascxนามสกุล
// TODO: Set the string 'searchPattern' to only get files with
// the extension '.aspx' and '.ascx'.
var filteredFiles = Directory.GetFiles(path, searchPattern);
อัปเดต : LINQ ไม่ใช่ตัวเลือกแต่จะต้องมีการsearchPatternส่งผ่านไปยังGetFilesตามที่ระบุในคำถาม