I have if or statement in which I put some of my conditions and a ternary operator. I've noticed that if I put ?: operator my if statement always go false. I'm wondering what causes it, because true condition comes before evaluating ?: operator so therefore it shouldn't even check it.
row.number == barcode -> false;
row.eancode == barcode -> true;
row.IspackingcodeNull() -> true;
if (row.number == barcode
|| row.eancode == barcode
|| row.packageean == barcode
|| row.IspackingcodeNull() ? false : row.packingcode == barcode
|| row.producerproductcode == barcode
|| row.alternativebarcode1 == barcode)
Aucun commentaire:
Enregistrer un commentaire