+ 1

How to put more than two conditions in conditional operator

Programming language C#

6th Jul 2020, 4:12 AM
Shivam Tirthe
2 odpowiedzi
+ 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
6th Jul 2020, 4:19 AM
Raj Chhatrala
Raj Chhatrala - avatar