Hello! :p
I don't fully understand how the Fall-Through method works. I’m making a Calendar and I’m using the switch statement to find which season it is for the month.
Here is the book code:
switch (month)
{
case 12:
case 1:
case 2: Console::WriteLine(S" [Winter]"); break;
case 3:
case 4:
case 5: Console::WriteLine(S" [Spring]"); break;
case 6:
case 7:
case 8: Console::WriteLine(S" [Summer]"); break;
case 9:
case 10:
case 11: Console::WriteLine(S" [Fall]"); break;
}
For example, if the month is 12, does it run everything until there is a semicolon or a break? Can someone tell me what this actually is doing?
-Matt ^_^