Re:A Preview of C# 8 [video]
by parenthephobia on Friday August 25, 2017 @04:18PM
(#15101834)
By turning the "else if" into an "if" you introduce a silent bug when Color.yellow is added, since the final else clause would now have to deal with both blue and yellow correctly.
Adding a new member to the Color enum should break code that isn't written to handle it: which is any code written before Color.yellow was introduced.
Adding a new member to the Color enum should break code that isn't written to handle it: which is any code written before Color.yellow was introduced.