title: GoTo statements and alternatives in VB.NET
body: <p>I've posted a code snippet on another forum asking for help and people pointed out to me that using <code>GoTo</code> statements is very bad programming practice. I'm wondering: why is it bad? </p>
  
  <p>What alternatives to <code>GoTo</code> are there to use in VB.NET that would be considered generally more of a better practice? </p>
  
  <p>Consider this snippet below where the user has to input their date of birth. If the month/date/year are invalid or unrealistic, I'd like to loop back and ask the user again.  (I'm using if statements to check the integer's size... if there's a better way to do this, I'd appreciate if you could tell me that also :D)</p>
  
  <pre><code>retryday:
      Console.WriteLine("Please enter the day you were born : ")
      day = Console.ReadLine
      If day &gt; 31 Or day &lt; 1 Then
          Console.WriteLine("Please enter a valid day")
          GoTo retryday
      End If
  </code></pre>