Make an enum that isnt int based..

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,081
Programming Experience
10+
I'm working with some XML and some tags are enumeration based in what they will accept. Because the enum values "A01" and "B01" dont make as much sense as what thye are for (Primary/Secondary) i'm wondering if I can make the enum say Primary/Secondary, but refer to values A01/B01


myObj.Role = MyObjRolesEnum.Primary

serialised:
VB.NET:
<MyObj>
  <Role>A01</Role>
</MyObj>
 
Back
Top