c# - Iterating through a list of paths from a config file? -
i have console app few foreach loops iterate through paths , parses out email addresses csv files. however, need loop read config file instead of going through directory, call existing api endpoint each email address. have now: static void runtask(string[] args) { foreach (string folders in directory.enumeratedirectories("c:\\tests"))//looks @ every folder within main folder called tests --this needs read list of paths { foreach (string path in directory.enumeratefiles(folders, "*.csv"))//looks @ every file extension ".csv" in each folder { debug.write("\n" + path + "\n"); //writes out file names using (streamreader sr = new streamreader(path)) { string line; while ((line = sr.readline()) != null) { string[] ...