David Smith

David Smith

  • NA
  • 2k
  • 0

Enumeration Comparison

Aug 7 2013 6:50 PM
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)