By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,180 Members | 1,191 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,180 IT Pros & Developers. It's quick & easy.

XML Serializer - some (enum) field not getting serialized...

P: n/a
Here's the scenario. I'm serializing a particular object, which contains
other objects as properties. I have this particular enum type that won't get
included in the serialized XML.

For illustration - I'll simplify the class (which is a property of the main
class being serialized); it looks as follows:

public class Contact
public ContactRoleType ContactRole;
public string ContactID;
// ....and some more fields...

The ContactRoleType is a normal enum. All fields are serialized, except the
enum field ContactRole. Strange thing is, when I rename the member field
ContactRole, it does get serialized.

I have actually used Chris Sells' excellent tool XmlSerializerPreCompiler ,
and all the types can be serialized without any problem.

All comments and ideas are welcomed!

Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.