I want to space in enum in c#.Like : FabricRollManagement to Fabric Roll Management I need enum list not a single value.where i pass a enmu list and return a list that contain multiple value
Asked
Active
Viewed 1,256 times
-2
-
What do you need it for? – rokkerboci Dec 23 '17 at 09:12
-
Do you need it for display purposes? Something like [this](https://stackoverflow.com/questions/1799370/getting-attributes-of-enums-value) ? – ProgrammingLlama Dec 23 '17 at 09:17
-
Do you want the _`string` manipulation_ that turns the string `"FabricRollManagement"` into the string `"Fabric Roll Management"`? – Jeppe Stig Nielsen Dec 23 '17 at 09:19
2 Answers
0
You can't, C# doesn't allow whitespace in variable, class or any declaration.

rokkerboci
- 1,167
- 1
- 7
- 14
0
Simple, you can not do it to code, but you can display it.
String save;
foreach (x in yourenum.toString().toCharArray()) {
if Char.isUpper(x) save += " " + x;
else save += x;
}

Fernando Ortu
- 99
- 6