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.
 
Back
Top