During a demo I saw a piece of test code where the developer had pasted an url in the code. And when the developer build the application everything worked, but we where all very curious why the compiler accepted the url as a line.
public class Foo
{
// Why doesn't 'http://www.foo.org' break the build?
public void Bar()
{
http://www.foo.org
Console.WriteLine("Do stuff");
}
}
Why does the code above build? Does the compiler treat the line as a comment?