title: C# label and goto
body: <p>This is my full program. Obviously I am a beginner. The problem I face is that if the age is less than zero then it goes back a few lines, but it than asks the user again for the pin also. :( What can I do to fix this ?</p>
  
  <pre><code> using System;
  
      namespace Examples
      {
          class Program
          {
              static void Main(string[] args)
              {
                  string name;
                  string city;
                  int age;
                  int pin;
  
                  // \n is used for line-break
                  Console.Write("Enter your name :  ");
                  name = Console.ReadLine();
  
                  Console.Write("\nEnter Your City :  ");
                  city = Console.ReadLine();
  
                  age:
                  Console.Write("\nEnter your age :  ");
                  age = Int32.Parse(Console.ReadLine());
  
                  Console.Write("\nEnter your pin :  ");
                  pin = Int32.Parse(Console.ReadLine());
  
                  if (age &lt; 0 || age &gt;= 110)
                  {
                      goto age;
  
                  }
  
  
                  // Printing message to console
                  //formatting output
                  Console.WriteLine("==============");
                  Console.WriteLine("Your Complete Address:");
                  Console.WriteLine("============\n");
  
                  Console.WriteLine("Name = {0}", name);
                  Console.WriteLine("City = {0}", city);
                  Console.WriteLine("Age = {0}", age);
                  Console.WriteLine("Pin = {0}", pin);
                  Console.WriteLine("===============");
  
                  Console.ReadLine();
              }
          }
      }
  </code></pre>