C Sharp

Here’s a cute little puzzler I got from the blog hackification — why the does code below compile?

Swift

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

using System;

namespaceConsoleApplication1

{

classProgram

{

staticvoidMain(string[]args)

{

http://www.globalnerdy.com

System.Console.WriteLine(&quot;Hello from Global Nerdy!&quot;);

System.Console.WriteLine(&quot;(Press ENTER tocontinue)&quot;);

System.Console.ReadLine();

}

}

}

Here’s what the output of the program looks like:

Why does the program compile even though the first line of the Main() method is a “bareword” URL? See if you can figure it out on your own rather than running it through the compiler – doing that gives away the answer.