title: How can I use method from an class instantiated in another form?
body: <p>I have an class instaciaded in the <code>Form1</code> and I want call it <code>Form2</code> it is possible? </p>
  
  <p>For example: </p>
  
  <pre><code>public TheClass thClass; //member from Form1
  
  /* ... */ 
  
  public void foo() { 
         thClass = new TheClass(...);
  } 
  </code></pre>
  
  <p>Form 2:</p>
  
  <pre><code>public void baa() { 
          Form1 form1 = new Form1();
          form1.thClass.MethodName( .. ) ;
  }
  </code></pre>
  
  <p>I'm getting the following erro when call the  <code>.baa()</code> method in <code>Form2</code>: </p>
  
  <pre><code>Object reference not set to an instance of an object.
  </code></pre>
  
  <p>What's the best way to do this? <code>ref</code> ?
  I'm wanting do this not instantiated  the thClass again.</p>
  
  <p>I hope this is clear. Thanks in advance. </p>