Hi
Does anyone know of a way to deserialize xml data that has an element
that represents an enum value but is actually an integer?
I know I can use [XmlEnum(Name="2 3")] to tag enum values, that works
but is too messy. I have many enums and would prefer not to have to tag
them all!
xml data
<myclass>
<MyProperty>2 3</MyProperty>
</myclass>
VB code snippet:
Public enum MyEnum
value1 = 23
value2 =888
End enum
public class myclass
public MyProperty as MyEnum
....
end class
This is exactly the same problem as I found somebody else had had before
(but didn't seem to get an answer).
thanks in advance
Richard
-----------
Please provide code examples in VB if possible...than ks!
-----------
Does anyone know of a way to deserialize xml data that has an element
that represents an enum value but is actually an integer?
I know I can use [XmlEnum(Name="2 3")] to tag enum values, that works
but is too messy. I have many enums and would prefer not to have to tag
them all!
xml data
<myclass>
<MyProperty>2 3</MyProperty>
</myclass>
VB code snippet:
Public enum MyEnum
value1 = 23
value2 =888
End enum
public class myclass
public MyProperty as MyEnum
....
end class
This is exactly the same problem as I found somebody else had had before
(but didn't seem to get an answer).
thanks in advance
Richard
-----------
Please provide code examples in VB if possible...than ks!
-----------
Comment