Instantiate in the class
<p>I am working on something and I have to instantiate the class. My question is where would I do that at? Would I do it before this:</p>

<pre><code>public partial class Form1 : Form
    {
       InputClass myclass = new InputClass();
        public Form1()
        {
            InitializeComponent();
        }


Or

public partial class Form1 : Form
    {

        public Form1()
        {

        InputClass myclass = new InputClass();

            InitializeComponent();
        }
</code></pre>

<p>Here is another code I am working on but it is not working out to well this is what my code looks like right now:</p>

<pre><code>public partial class Form1 : Form
{


    InputClass myClass = new InputClass();
    myClass.yourname = "";
    myClass.Banner = "";

 public Form1()
    {
        InitializeComponent();
    }
</code></pre>

<p>I am new to C# and I am trying to figure this out. I need to instantiate the class. Then when the page load add to set the labels text from the _banner variable. Then add code to set the property yourname from the text in the textbox when the user presses the button. Then i need to clear the textbox. I also have to display the name in a messagebox from the class.</p>

<pre><code> class InputClass
{
    public string _banner;
    private string _yourName;

    public InputClass(String _banner)
    {
        this._banner = _banner;
    }

    public string yourName
    {
        get { return _yourName; }
        set { _yourName = value; }
    }

}
</code></pre>

<p>}</p>
