question about enum

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is it possiable to set a enum that conatines more than one word?

for example:

public enum Group
{
Boys=1,
Girls,
Boys And Girls
}

when i'm putting space between two words i get errors, is it possiable? and
if not what can be an alternative option?

thanks
 
Gidi said:
is it possiable to set a enum that conatines
more than one word? [...]
when i'm putting space between two words
i get errors, is it possiable? and if not what
can be an alternative option?

You can't use spaces in identifiers in C#. You can indicate separate
words with underscores (boys_and_girls) or capital letters
(boysAndGirls).

P.
 

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
Spaces in Enum 11
I have small probalem 4
Question about enum values 10
enum with underlying type 1

Back
Top