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"?

没有正确的解决方案

许可以下: CC-BY-SA归因
scroll top