enum ValidationMessages
{
C01_OOHArrestRequired = "Test",
Trivial,
Regular,
Important,
Critical
};
I have the above code. I want to be able to create enums which I can use but are strings not integers.
This is so I can show same string in the UI for validation errors and then test for them in my unit tests and have the messages coming from the same place (been static).
But it says "Cannot convert string to int"
How to have enum
as strings?