I think I may have found a bug with XSD Enum support???

Feb 22, 2013 at 12:37 AM
Hi,

Just been playing around with Enums in XSDs and I notice that while enums are created in the destination class, the private fields were not.
        [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=3)]
        public virtual PersonMaritalStatus MaritalStatus {
            get {
                return this.maritalStatusField; //Field not created
            }
            set {
                this.maritalStatusField = value;
            }
        }
Thoughts...??
Oct 15, 2013 at 8:56 AM
Hi ESSB,

I think the problem occurs when you try to generate with AutoProperties set to "True" with enum in the XSD : the enum properties are standard properties that use backing fields which are not generated.

Generating with AutoProperties set to "False" with enum in the XSD works fine.

So +1 for a bug.
Oct 27, 2013 at 10:44 AM
Edited Oct 27, 2013 at 10:45 AM
Thank you to have reported this ussue.
This discussion has been copied to a work item. Click here to go to
the work item and continue the discussion.