Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spaces in C# enumerations

Status
Not open for further replies.

developer155

Programmer
Jan 21, 2004
512
US
Hi, is there any way I can have a space in enumeration, like this:
public enum Jobs
{
EASYMTargetLauncher,
EASYMBaseTargetLauncher,
EASYMExtendedTargetLauncher,
EMailNetwork_ExecuteTarget (Launch Base Executions)

}

The enum has system jobs and few of them have spaces, how can I store it in enum?

thanks
 
an enum is just an alias for an integer. like any other name in .net, it's just a sequence of alphanumerics with no punctuation.

leave out the spaces and puctuation and use pascal case:

EMailNetwork_ExecuteTargetLaunchBaseExecutions

if you need other targets, pass them as parameters to the function that uses the enum instead.





mr s. <;)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top