1
Answer

switch statement with multiple variables

Ask a question
htmlforums

htmlforums

15y
8.4k
1

hi

is it possible to have a multiple variable in a switch statement?

E.g

switch(var_a,var_b)

case var_a='12'  &&  var_b='21'

    do something

case var_a='15' && var_b='18'

   do something

 

In other programming language this can be done, but i don't know how to code in c#. 

Thanks

 

 

 


Answers (1)