Using Illegal Characters in Enumerations
Posted on 2004-04-07
I'm trying to create an enumeration containing the rank for a Playing card (Ace-King). Here's what I'm trying:
Public Enum Rank
I am getting errors when trying to use the integer values (2, 3, 4, etc). Is there a way to define an enumeration while keeping these "illegal" characters? I don't need to manipulate the value as an Integer - just intend to use it as a string. I tried defining As Byte, but that didn't work. Should I be using a different collections type?