How to seralize only some properties in .Net?
- by Beta033
This is for a web project so i have several classes that inherit from Web.UI.
I only want to serialize very particular properties (basically, only local properties)
I'm aware of the XMLIgnore property that can be placed on a property to ignore items, but this won't work in my context since that would require modifying a bunch of stuff that i really don't want to modify (and probably can't).
So how do i tell the xml serializer to ignore everything except for X and Y or tell it to seralize just X and Y?
i could just create my own xml in a string builder or something and if that's the only way, so be it. however i'm looking for a method that will employ the built in XML stuff.
Thanks