I added attribute serializable to class but, due to this, class property is getting serialized.
I used [XmlIgnore] to all property but still it is serializing the property
[Serializable]
public class Document
{
[DataMember]
[XmlIgnore]
public string FileURL { get; set; }
[DataMember]
[XmlIgnore]
public string FileSize { get; set; }
}
It's serialized like below tag-
<a:_x003C_DocumentDetails_x003E_k__BackingField>
<a:Document>
<a:_x003C_FileType_x003E_k__BackingField>PDF</a:_x003C_FileType_x003E_k__BackingField>
<a:_x003C_FileURL_x003E_k__BackingField>C:/log/Test.pdf</a:_x003C_FileURL_x003E_k__BackingField>
</a:Document>
</a:_x003C_DocumentDetails_x003E_k__BackingField>