Adding Methods To Windows Form?
<p>I have 2 windows Forms, a parent and a child. The parent is the main form. The child is a dialog where the user can edit their details.</p>

<p>When a button is clicked on the parent form, it loads the child form. Like so:</p>

<pre><code>private void add_account_Click(object sender, EventArgs e)
{
     this.account_add_edit = new Form2();
     account_add_edit.test();
     account_add_edit.ShowDialog();
}
</code></pre>

<p>As you can see I've created a new form, tried to call a function from the new form, and then showed the form. The problem is the method from the form is not being called. I am getting an error on the IDE that says Windows.Forms.Form does not contain a method test.</p>

<p>I've created the method in the child form:</p>

<pre><code>public static string test(string val)
{
    this.username = val;
}
</code></pre>

<p>Any ideas as to what I'm doing wrong?</p>
