title: C# Get field from Main Form
body: <p>I have a main form and I need in other class get or set field from Main Form. I created public property in Main Form:</p>
  
  <pre><code>public partial class MainForm : Form
  {
       public string get_txt()
       {
           return phone.Text;    //phone - textbox
       }
  }
  </code></pre>
  
  <p>But in other class I can't get this property:</p>
  
  <pre><code>MessageBox.Show(MainForm.get_txt); //there error. It doesn't seemed get_txt property.
  </code></pre>
  
  <p>I'm sorry for this simpliest question, but I really don't know this. Everywhere wrote that simpliest way to do it - in class of Main Form create public property for needed private field in Main Form. What do I wrong?</p>