Bonjour,
je voulais savoir comment on pouvais faire un OU dans un switch case genre :
MerciCode:
1
2
3
4
5
6 switch (myVar) { case key.Down || key.Up : ... }
Version imprimable
Bonjour,
je voulais savoir comment on pouvais faire un OU dans un switch case genre :
MerciCode:
1
2
3
4
5
6 switch (myVar) { case key.Down || key.Up : ... }
Tout simplement comme ca:
Code:
1
2
3
4
5
6
7 switch (myVar) { case key.Down : case key.Up : Instructions; break; }