title: How do I use Try and Catch to retry an operation in VB.Net?
body: <p>I'd like to read from a file and if I fail, let the user retry or otherwise give up.  So far the code looks like this:</p>
  
  <pre><code>Read_Again:
      Try
          my_stream.Read(buffer, 0, read_len)
      Catch ex As System.IO.IOException
          If MessageBox.Show("try again?") = DialogResult.Retry Then
              GoTo Read_Again
          Else
              Application.Exit() 'just abort, doesn't matter
          End If
      End Try
  </code></pre>
  
  <p>I don't like the Goto, it's ugly.  But I don't see how to make a loop that spans the try and catch.</p>
  
  <p>Is there a better way to write this?</p>