Skip to content

Instantly share code, notes, and snippets.

@WPDC
Last active December 14, 2015 02:22
Show Gist options
  • Save WPDC/9e5e7f107077fbab86b1 to your computer and use it in GitHub Desktop.
Save WPDC/9e5e7f107077fbab86b1 to your computer and use it in GitHub Desktop.
CS0110 3.4 - Conversion to switch/case
switch ( weatherCondition )
case 'sunny':
go for a walk
break;
case 'raining':
dance in the rain
break;
case 'foggy':
sound the fog horn
break;
case 'snowing':
build a snowman
break;
default:
read a book
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment