On 2007-11-21 05:26:47 -0800, "Emre DİNÇER" <ed*****@meteksan.com.trsaid:
is it possible to have a multiple criteria switch in C#
switch(name , surname){
case "John","Smith"
break;
}
thanks in advance
Well, what sort of behavior do you expect?
In the example you give, you could convert it to something like this:
switch (name + surname)
{
case "JohnSmith":
break;
}
There's no syntax like what you originally proposed, depending on the
exact behavior you're trying to do, it may not be hard at all to
implement using a different syntax.
Pete