I'm having an issue in deserializing an object from XML. I generated my XML
schema from my .NET dll using xsd.exe. I've used that schema in another
application. That application spits out XML based on user input and workflow.
It is sending out the integer value for enums instead of the string values.
This seems like it should be the most common sense way to do it (since it's
an easy cast from int to an enum (MyEnum)myInt) but XML deserialization
complains. If I manually edit the XML to contain the strings for those, it
successfully casts the strings into the enum.
Is there a work around other than implementing ISerializable and controlling
the serialization/deserialization of the object manually? I could also alter
the external application, but I'm hoping not to have to waste the effort of
modifying multiple instances if there is an attribute that I can put on the
property that will make it work (or some other fix).