cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
Example:
The XML file will be made as:
<TheString>whatever</TheString>
I'm wondering can I apply the same thing to an Enum member:
THis way my code can look nice, with full names, but the XML is formed as:
<carFeature>PAS</carFeature>
from
mySerializableCar.CarFeature = PowerAssistedSteering
any ideas?
VB.NET:
private str as String
[XmlElementAttribute("TheString")]
Public Readonly MyStr as String
Get
Return str
End Get
End Sub
The XML file will be made as:
<TheString>whatever</TheString>
I'm wondering can I apply the same thing to an Enum member:
VB.NET:
Public Enum MyEnum
[XmlElementAttribute("ABC")]
ActiveBrakeControl,
[XmlElementAttribute("PAS")]
PowerAssistedSteering
End Enum
THis way my code can look nice, with full names, but the XML is formed as:
<carFeature>PAS</carFeature>
from
mySerializableCar.CarFeature = PowerAssistedSteering
any ideas?