disinclude from xml serialization

  • Thread starter Thread starter John Grandy
  • Start date Start date
J

John Grandy

How to mark a public member of a class so that it is not included in an xml
serialization or deserialization ? Thanks.
 
How to mark a public member of a class so that it is not included in an xml
serialization or deserialization ? Thanks.

Mark the property with the attribute XmlIgnore as below:

[XmlIgnore()]
public string NotNecessaryString {get; set;}
 
Back
Top