嗨,我对 C# 很陌生,您可能会猜到,我收到以下错误:
Error 1 'customer_details_form' is a 'namespace' but is used like a 'type'
如果返回一个值,我想关闭一个表单并打开另一个表单。但是我正在为要输入的内容而苦苦挣扎,即形式叫什么?是我应该使用的命名空间还是其他东西。
public void button1_Click(object sender, EventArgs e)
{
string fileName = string.Format(tblastname.Text);
if (File.Exists(fileName))
{
MessageBox.Show("this customer already exsists");
}
else
{
MessageBox.Show("No file found, please create new customer");
home_form f2 = new home_form();
this.Hide();
f2.ShowDialog();
//if false bring up new customer form.
customer_details_form f4 = new customer_details_form();
this.Hide();
f4.ShowDialog();
}
}