0

"Select Case" with multiple conditins -C#

In a SELECT, how can we use multiple conditions? for example SELECT x, y, z Case x=1and y=2 and z=3 Do something

8th Mar 2017, 8:47 AM
Júlio César Fortes
Júlio César Fortes - avatar
4 Réponses
0
just use "if(cond1) { ... } else if(cond2) { ... }"
10th Mar 2017, 5:51 AM
gjh4cker
gjh4cker - avatar
0
sorry. thats not the question...
10th Mar 2017, 7:53 AM
Júlio César Fortes
Júlio César Fortes - avatar
0
you can use ternary operator, please check my source code https://code.sololearn.com/c6C0NbpaOXl0
10th Mar 2017, 12:29 PM
gjh4cker
gjh4cker - avatar
0
use logical and, i dont think you can do a switch - case statement but if((x=1)&&(y=2)&&(z=3)){} will accomplish the task
13th Mar 2017, 8:08 PM
William La Flamme
William La Flamme - avatar