I have a simple enum:
enum simple
{
one,
two,
three
};
I also have a class that has a property of type simple
. I tried decorating it with the attribute: [XmlAttribute(DataType = "int")]
. However, it fails when I try to serialize it using an XmlWriter
.
What is the proper way to do this? Do I have to mark the enum itself as well as the property, and if so, with which data type?