htmlforums

htmlforums

  • NA
  • 12
  • 0

switch statement with multiple variables

Feb 12 2009 3:49 AM

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 (2)