internal bool CanHaveMaxLength() { SimpleType rootType = this; while (rootType.BaseSimpleType != null) { rootType = rootType.BaseSimpleType; } return string.Equals(rootType.BaseType, "string", StringComparison.OrdinalIgnoreCase); }