Recursively listing the files

This function will help you to list all the files with the specified extension recursively i.e. it will also list the files within the child directory. private static void BuildList(string searchPath, bool recursive, string ext, ArrayList files) {   DirectoryInfo parentDir = new DirectoryInfo(searchPath); DirectoryInfo[] children = parentDir.GetDirectories(); if (recursive && children.Length > 1) {…

2