Say that I have this Enum:
enum GradeEnum
{
A = 1,
B = 2,
C = 3,
}
Then I do
GradeEnum grade = (GradeEnum)Enum.Parse(typeof(GradeEnum),"234");
Then there no error triggered and the grade variable value is 234
. But if I do comparaison with value of GradeEnum as expected the grade
variable has not matched value.
Question, why is there no exception trigger by the Parse
method?