I would like use a switch statement which takes several variables and looks like this:
switch (intVal1, strVal2, boolVal3)
{
case 1, "hello", false:
break;
case 2, "world", false:
break;
case 2, "hello", false:
etc ....
}
Is there any way to do something like this in C#? (I do not want to use nested switch statements for obvious reasons).
The question was answered by .net dev team by implementing of exactly this fearture: Multi-variable switch statement in C#
See Question&Answers more detail:os