找不到类型或名称空间名称"Form2"(是否缺少using指令或程序集引用?) [英] The type or namespace name 'Form2' could not be found (are you missing a using directive or an assembly reference?)

查看:608
本文介绍了找不到类型或名称空间名称"Form2"(是否缺少using指令或程序集引用?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi every1,

我在前台管理上做了一个Windows应用程序.
在这种情况下,我有两种形式.

编译时出现此错误,例如

找不到类型或名称空间名称"Form2"(您是否缺少using指令或程序集引用?)"

hi every1,

i did a windows application on frontoffice manamgement.
in that i hav two forms.

while compiling i am getting this error like

"The type or namespace name ''Form2'' could not be found (are you missing a using directive or an assembly reference?) "

推荐答案

检查您的名称:
1)您的应用程序中是否有一个名为Form2的类?您确定不是form2吗? C#对名称的大小写敏感.
2)类是否在同一个名称空间中?命名空间位于文件的顶部,如果您对其进行了更改,则必须更明确地引用表单(或将命名空间更改回!)
Check your names:
1) Is there a class called Form2 in your application? Are you sure it''s not form2 instead? C# is sensitive to the case of names.
2) Is the class in the same namespace? The namespace is at the top of the file, and if you have changed it then you will have to be more explicit in referring to your form (or change the namespace back!)


确保您已经在form1中包含了form2所属的名称空间.
Make sure you have included the namespace that form2 falls under in form1.


这篇关于找不到类型或名称空间名称"Form2"(是否缺少using指令或程序集引用?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆