I have an enum, with two values. However, the second value contains a slash (the value is application/xml). This causes a number of syntax values to show up. Is it not possible to have an enum with a member like this?
And if this is the case, what is the solution?
Thanks
Enum values can only be integral types (byte, sbyte, short, ushort, int, uint, long, or ulong). Enum names can only be valid .NET identifiers => no
/possible. So the solution to whatever you are trying to do (which you haven’t explained in your question) would be not to use enums. One possible alternative is to use aDictionary<TKey, TValue>. But once again without knowing your exact scenario and what you are trying to achieve it is difficult to propose a precise answer.