0

I have this code:

        static void Main(string[] args)
        {
            Console.WriteLine("iexplore");
            http://www.google.com;
            Console.WriteLine("maximize"); 
            Console.ReadLine();
        }

It's not clear to me why this code compiles? Because I have an url there and it's not a c# keyword...

Buda Gavril
  • 21,409
  • 40
  • 127
  • 196

1 Answers1

5

In C# doing

someText: 

makes a label for a goto, after that the

//Some other text

is a comment so

http://www.google.com;

is the label http: followed by the comment //www.google.com;

Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431