sean-keys
asked on
How to call a method in a different class.
This code generates the following error. I'm new to c# and programming in general, so I'm not quite sure what needs to happen.
public class confirm : System.Windows.Forms.Form // this is the class that makes the call
private void button1_Click(object sender, System.EventArgs e)
{
AddOrder(); // this exists in public class Form1 : System.Windows.Forms.Form
Here is the error I get, and both classes exist in POS.
The name 'AddOrder' does not exist in the class or namespace 'POS.confirm
Thanks,
Sean
public class confirm : System.Windows.Forms.Form // this is the class that makes the call
private void button1_Click(object sender, System.EventArgs e)
{
AddOrder(); // this exists in public class Form1 : System.Windows.Forms.Form
Here is the error I get, and both classes exist in POS.
The name 'AddOrder' does not exist in the class or namespace 'POS.confirm
Thanks,
Sean
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks,
Sean