+ 1
How to put more than two conditions in conditional operator
Programming language C#
2 Respostas
+ 3
You can use logical-and(&&) operator if you want all conditions to be true or else you can use logical-or(||) if you want to check if any one of the condition is true.
(condition1 && condition2) ? //If all conditions are true // if all conditions are false or any one of them is false
(condition1 || condition2) ? //If any one condition is true // if all conditions are false