Quote:and this:
new string[] { "North", "East", "South", "West" } [2]
Quote:Ok, I can see kinda how the value might be South like the book is saying. But where is this being returned to. How do you use this? In the second one, I have no clue what dir is going to result in. How do you use this? Are these some values returned to some method somehow? Maybe there should have been a better example, I dunno.
Here‘s a statement that displays one of the four compass points based on the variable dir: Console.Write(new string[] { "North", "East", "South", "West" } [dir]);