private string expandTerms(List<string> terms, string ooperator = "&&") { string result = ""; for (int x = 0; x < terms.Count; x++) { result += "(" + terms[x] + ")"; result += (x + 1 == terms.Count) ? "" : " " + ooperator + " "; result += "\n"; } return "(" + result + ")"; }