title: vb.NET "Object reference not set to an instance of an object"
body: <p>I'm receiving the following error in VB.Net.</p>
  
  <p>"Object reference not set to an instance of an object"</p>
  
  <pre><code>Try
  
      Dim myurl As String
      myurl = "http://example.com/page.php?user=" &amp; uzjer
      WebBrowser1.Url = New Uri(myurl)
  
      For Each ele As HtmlElement In WebBrowser1.Document.Links
          Dim username As String
          username = ele.GetAttribute("name")
  
          MsgBox(username)
  
      Next
  Catch ex As Exception
      MsgBox(ex.Message)
  End Try
  </code></pre>