A More Complicated Switch - Case
So, under Satis, we just added a ternary operation. If Satis's occupation == "Web Monkey", we append "Hello Master.<br>" to the contentString string. Otherwise, we append "You suck.<br>". Meanwhile under the Pig and Ox section, after appending the Hello Grabber greeting, I then check to see if the name is "Pig" and if the occupation is "Grabber". If it is, I don't append anything. If it's not, I append "Wait, you're not grabbing any more?".
Hopefully that's pretty clear. If - then - else, ternary operations and switch - case are used constantly throughout all languages I code in. Learning how they work will be of benefit even if you decide not to learn C#. Keep in mind that all of these statements follow specific, logical order. For instance, with the if - then - else statement, the code checks all your conditions until it matches one, then it stops checking. With ternary it's the same thing, though a simple ternary operaion only has two options. If you nest options, you have to evaluate them in order. Finally with a switch - case, a specific case option can only ever appear once within one case. If you try to have it appear more than once you will get an error.
With our logic covered, we'll now look over the different kinds of operators you can use.