Should I use AND or should I use OR [closed]
https://softwareengineering.stackexchange.com/questions/171773
-
05-11-2019 - |
题
An order can be in the "status" of Completed, Corrected or some other status.
I saw some code that is checking it like this, the purpose is to disable some stuff when the status is in Completed or Corrected status.
if (model.CurrentStatus != DSRHelper.OrderStatusEnum.Complete && model.CurrentStatus != DSRHelper.OrderStatusEnum.Corrected)
I can't get it why the engineer has used "AND" for this, shouldn't it be an "OR"?
没有正确的解决方案