I'm using silverlight on WP7. I have a class I am trying to serialize to isolatedstorage. I know the framework will take care of serializing the class automatically for me, assuming every property is serializable.
For this class, I have some properties (such as BitmapImage) that are not serializable. Is there a way to tell the framework to NOT serialize that property (and instead, set it as null when it deserializes it?)
I know implementing XmlSerializable is a possibility, but I don't want to have to set/get each manually. I'd rather it serialize what I tell it to, and I can go and set the other properties after it has deserialized.
thanks
You can use XmlIgnoreAttribute to tell XmlSerializer to ignore your property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With