The simple answer is no. You cannot use it.
The switch works with a single expression .
See MSDN for more details .
You can try the following: -
if (playerscore == pcscore)
{
switch (playerscore)
{
case 1:
PlayerLife.Image = Properties.Resources.Five;
break;
}
}
EDIT: -
As Jeppe Stig Nielsen comments in the comments, You can switch on any expression of a suitable type. That expression may contain ||. There can be many case labels associated with each switch section in a switch block.
. if.
, :
switch (playerscore == 1 || pcscore == 1)