void Write12_XmlSchemaSimpleTypeUnion(XmlSchemaSimpleTypeUnion o) {
if ((object)o == null) return;
WriteStartElement("union");
WriteAttribute(@"id", @"", ((System.String)o.@Id));
WriteAttributes((XmlAttribute[])o.@UnhandledAttributes, o);
if (o.MemberTypes != null) {
ArrayList list = new ArrayList();
for (int i = 0; i < o.MemberTypes.Length; i++) {
list.Add(o.MemberTypes[i]);
}
list.Sort(new QNameComparer());
w.Append(",");
w.Append("memberTypes=");
for (int i = 0; i < list.Count; i++) {
XmlQualifiedName q = (XmlQualifiedName)list[i];
w.Append(q.ToString());
w.Append(",");
}
}
Write5_XmlSchemaAnnotation((XmlSchemaAnnotation)o.@Annotation);
WriteSortedItems(o.@BaseTypes);
WriteEndElement();
}