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
  • 20,719
  • 39
  • 122
  • 185

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
  • 121,188
  • 31
  • 271
  • 414