public static bool IsAllSimpleType(List<XmlSchemaElement> elements) { bool allSimple = true; foreach (XmlSchemaElement element in elements) { if (!IsSimpleType(element)) { allSimple = false; } } return allSimple; }