Hello,
I try to serialize a n object to xml file.this object containt a property length
- [System.Xml.Serialization.XmlAttributeAttribute()]
- [System.ComponentModel.DefaultValueAttribute(1D)]
- public double Length
- {
- get
- {
- return this.lengthField;
- }
- set
- {
- this.lengthField = value;
- }
- }
When i give the value 1 to this property it does not displayed. Despite when i tried to affect the value 1.65 or 1.75 it appeared
"Name" Attribute2="LastName" Attribute3="Age" Attribute4="Price"> "NamePerson" Attribute2Person1="LastNamePerson" />"NamePerson" Attribute2Person2="LastNamePerson" />"NamePerson" Attribute2Person3="LastNamePerson" />"NamePerson" Attribute2Person4="LastNamePerson" />"Name" Attribute2="LastName" Attribute3="Age" Attribute4="Price" length="1.75">"NameMan" Attribute2Person1="LastNameMan" length="1.65" />"NameMan" Attribute2Person2="LastNameMan" />"NameMan" Attribute2Person3="LastNameMan" length="1.55" />"NameMan" Attribute2Person4="LastNameMan" />"Name" Attribute2="LastName" Attribute3="Age" Attribute4="Price">"NameWomen" Attribute2Person1="LastNameWomen" />"NameWomen" Attribute2Person2="LastNameWomen" />"NameWomen" Attribute2Person3="LastNameWomen" />"NameWomen" Attribute2Person4="LastNameWomen" />
How can fix this problem to display Length=1 ?
Ashutosh GuptaPosted Nov 9, 2020, 1:02 PM
Sachin SinghPosted Nov 8, 2020, 11:24 PM