-
Enum Question
Code:
public enum ValidCommands{
help, bp, listbp, clearbp, cont,
lv, changelv, source, stov,
sti, stout, p, halt , ft
}
instead of help, how can I put in '?' without an error?
so I want this too work ...
Code:
public enum ValidCommands{
?, bp, listbp, clearbp, cont,
lv, changelv, source, stov,
sti, stout, p, halt , ft
}
-
Re: Enum Question
You can't. '?' is a reserved character. Why would you want to anyway??
-
Re: Enum Question
you might not know that but Enums are of type byte, short, int or long.
If you are thinking of using the enum as a string validator it's not gonna work
-
Re: Enum Question
Just use an array to contain the list of valid commands.