public static string GetSearchDirs(this List<FileQuery> queries) { if (queries == null) { throw new ArgumentNullException("queries was null."); } var ret = ""; foreach (var q in queries) { ret += q.SearchDir + ";"; } return ret.TrimEnd(';'); }