private static void InnerGetFields(IConnectiveSqlClause connective, HashSet <string> fields) { HashSet <string> innerFields = connective.GetFields(); foreach (string field in innerFields) { if (fields.Contains(field) == false) { fields.Add(field); } } foreach (IConnectiveSqlClause subConnective in connective.GetSubConnectiveSqlClause()) { InnerGetFields(subConnective, fields); } }