8
Reply

Enumeration Comparison

David Smith

David Smith

Aug 7 2013 6:50 PM
1.1k
Also below I am try to compare Enumeration value, for some reason the statement is dropping into the condition which is not valid. Because the value equal to each other when I step into the code. So it should not jump into the case below.

prevColorOn.Type = On
ColorType.ColorOn = On

if (prevColorOn.Type != ColorType.ColorOn)
              {
                  throw new ArgumentException("prevColorOn", "Did not recieved expected ColorType'prevColorOn'.");
              }

Answers (8)