C#无法打开新表格 [英] C# cant open new form
本文介绍了C#无法打开新表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这很奇怪,我已经在一个项目上工作,现在想要添加一个登录部分,在我创建了我想要的登录表单之后添加一个按钮来加载该表单,通常它工作但现在它没有。
我得到的错误是:
'login'是一个变量,但是使用类似
表格被称为登录
提前感谢
我的尝试:
Hi,
This is weird, i´ve been workig on a project and now want to add a login section, after i created the login form i wanted do add a button to load that form, usually it worked but now it doesnt.
the error i get is:
'login'is a variable but is used like a type
the form is called login
thanks in advance
What I have tried:
private void adminToolStripMenuItem_Click(object sender, EventArgs e)
{
login login = new login();
login.Show();
}
推荐答案
只需将变量名称更改为不同的名称即可。您正在使用类型名称作为变量名称。
Just change a name of variable to something different. You are using type name as variable name.
这篇关于C#无法打开新表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文