C# - Can't access public function from different class
<p>I'm starting with C# and I got a problem.</p>

<p>I created a "Windows Form Application" project.</p>

<p>I have a form class named form1 and I added a UserControl class named usercontrol1. In usercontrol1, I have a public function named test which returns 123.</p>

<p>For some reason I can't do this:</p>

<pre><code>private void Form1_Load(object sender, EventArgs e)
{
 UserControl usercontroltest = new usercontrol1();
 usercontroltest.test();
} 
</code></pre>

<p>The error I get is "user control does not contain a definition for"</p>