Why Does This C# Code Compile?

by Joey deVilla on November 28, 2008

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

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

Console output: "Hello from Global Nerdy! (Press ENTER to continue)"

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.

I’ll post the answer in the comments.

{ 6 comments… read them below or add one }

Leave a Comment

Previous post:

Next post: