title: "NullReferenceException was unhandled by user code"
body: <p>I was having some issues the other day with my interface lagging and after asking here someone suggested using a using statement to dispose of the webbrowser.</p>
  
  <p>Now after implementing it I keep getting:</p>
  
  <blockquote>
    <p>NullReferenceException was unhandled by user code-
    Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>I am having a weird issue because even if I am running code that has nothing to do with another I keep getting the nullreference error there which makes no sense.</p>
  
  <p>Here is an example of my code:</p>
  
  <pre><code>using (System.Windows.Forms.WebBrowser webBrowser1 = 
      new System.Windows.Forms.WebBrowser())
  {
      // issue happens here
      if (webBrowser1.Url.AbsoluteUri.Contains("/signup"))
      {
          // rest of the code 
      }  
  }
  </code></pre>