I used WSDL, and one of the fields was of type enum, and in the generated reference.cs two fields were created for this:
The field was named "IsPayment" and it generated one of them: IsPaymentField and IsPaymentFieldSpecified
I read from this answer: Why is my public property not serialized by XmlSerializer?
That elements with public bool xxxSpecified with false are not serialized
So, I manually set it to True in the code and worked.
But what caused this field to create this specified field when not all other fields that use the same structure?
The only difference I see in WSDL is this field explicitly: nillable = true minOccurs = 0
all other fields have nothing, but the enumeration itself is defined as: nillable = "true"
So the only difference is: minOccurs in my opinion?
Thank.
Neil Walker Apr 27 '16 at 20:20 2016-04-27 20:20
source share