enum (error)

  • Thread starter Thread starter csharpula csharp
  • Start date Start date
C

csharpula csharp

Hello,
I want to add to Enum the following value :

ABC.12

but I get a compilaction error. How can I include such value in c# enum?

Thanks a lot!
 
It's not entirely clear whether you want to add the value "ABC.12" to some
enum or that you want to add the value "12" to the enum "ABC", but the
answer is the same: the enum-values should be "identifiers" (if I understand
everything correctly), which means they should contain only letters, digits
and/or underscores ("_"), but should not start with a digit.

Hans Kesting
 
Hello,
I want to add to Enum the following value :

ABC.12

but I get a compilaction error. How can I include such value in c# enum?

Thanks a lot!

*** Sent via Developersdexhttp://www.developersdex.com***

You cannot, a dot cannot be part of a symbol. you could use an
alternative like _ (you can not either use ; )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

about enum 3
Enum TypeConverter 3
Merge Info From Two Enums 1
Enum Extentions 7
[Flags] Enum -- make it better 1
Check Flags Enum for Validity 15
Enums & Constructors? 4
Spaces in Enum 11

Back
Top