I'm generating business objects from this schema using Enterprise Architect.
The schema has the following enumeration specification:
<xs:simpleType name="PackageMedium">
<xs:restriction base="xs:string">
<xs:enumeration value="NTP"/>
<xs:enumeration value="DAT"/>
<xs:enumeration value="Exabyte"/>
<xs:enumeration value="CD-ROM"/>
<xs:enumeration value="DLT"/>
<xs:enumeration value="D1"/>
<xs:enumeration value="DVD"/>
<xs:enumeration value="BD"/>
<xs:enumeration value="LTO"/>
<xs:enumeration value="LTO2"/>
<xs:enumeration value="LTO4"/>
</xs:restriction>
</xs:simpleType>
Enterprise architect generates the following code but Visual Studio doesn't like the dash(-) in CD-ROM and will not compile.
public enum PackageMedium : int {
NTP,
DAT,
Exabyte,
CD-ROM,
DLT,
D1,
DVD,
BD,
LTO,
LTO2,
LTO4
}
What can i do to make this work?
based on @Craig Stuntz answer i was able to find this article which helped me retrieve these special characters from the Enum.