Notice that each named item in the enumeration is not enclosed in quotes.
Enumerated names are not strings; they're actually constants. If you look
at the IL of an enumeration, you'll see that your Enum is actually a class
that derives from System.Enum. Each name in the Enum becomes a Public Const
field of the class.
Because the names are not strings, the dash is interpreted as a minus sign
which is an illegal character in a type or variable name.
HTH
----------------
Dave Fancher
http://www.davefancher.com
"guoqi zheng" <no@sorry.com> wrote in message
news:77******************************@ureader.com. ..
Trying to declare a enum datatype.
Below works
Public Enum EnumCharSet
IBM037
IBM437
IBM500
End Enum
When I add a new string with a "-", error occur says that "End of
statement
expected"
For example
Public Enum EnumCharSet
IBM037
IBM437
IBM500
ASMO-708
End Enum
Does not work because ASMO-708 has a "-" there.
What went wrong and what should I do?
regards,
Guoqi Zheng
http://www.ureader.com