title: deleting lost objects in c#
body: <p>This is a function from a class I made that creates an object:</p>
  
  <pre><code>public static void CreateLabel()
  {
       Label myLabel = new Label();
       // changes added to the myLabel
  }
  </code></pre>
  
  <p>Now let's say that I call that function.</p>
  
  <pre><code>private void btnShow(object sender, EventArgs e)
  {
       MyClass.CreateLabel();
  }
  </code></pre>
  
  <p>How do I delete 'myLabel' after I'm done with it?</p>
  
  <pre><code>this.Controls.Remove(myLabel); // doesn't recognise myLabel
  </code></pre>