I have a custom class that I want to serialize. The class has 4 properties: 1 String, 2 Enum of Byte, 1 Boolean. I am having no trouble doing the serialization, except that I want the enumerations to be serialized as Bytes rather than Strings
(I want to see a 1, 2, 3, 4, etc. in the XML rather than the enumeration text). My main reason for this is that I want the XML to be as short as possible, so this will save a reasonable amount of space. Can anybody tell me how to do this? I know about the
IXmlSerializable Interface, as well as the XmlEnum attribute, but these both involve manual conversions or manually labeling the enumeration if it gets changed. I would also be happy (actually even prefer) to do a binary enumeration, but I don't know how to
do that. Can somebody help me figure out how to have an enumeration serialized as a Byte rather than a String? Thanks.
Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/