Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignoring a property during deserialization

I have a class that is serializing very nicely - finally!

Now I want to add a property to this class, that I don't want to be serialized at all.

Is it possible to add this new property with some kind of attribute so that when I call serialize or deserialize methods, this property will go unnoticed?

like image 899
JL. Avatar asked Jul 29 '09 09:07

JL.


1 Answers

[XmlIgnore]
public int DoNotSerialize { get { ... } set { ... } }
like image 170
codeape Avatar answered Oct 11 '22 15:10

codeape