I want to do enumfor possible ratings. This is a working example:
public enum Grade
{
A, B, C, D, E, F
}
However, I want the ratings to be integers, for example
public enum Grade
{
1, 2, 3, 4, 5
}
Why does the first work, but not the second? How can I create a similar variable that can only take values from 1-5 (and can be zero)?
source
share