找不到类型或名称空间 [英] The type or namespace could not be found
本文介绍了找不到类型或名称空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到这样的错误
找不到类型或名称空间名称"Marketing"(您是否缺少using指令或程序集引用?)"
当我使用此代码时
I got an error like this
"The type or namespace name ''Marketing'' could not be found (are you missing a using directive or an assembly reference?)"
when i am using this code
Marketing objbann = new Marketing();
objbann.Page = ddlPage.SelectedValue;
objbann.Position = ddlBPosition.SelectedValue;
如何解决....
how to solve it....
推荐答案
亲爱的,
检查条件:
1-检查Marketing类访问修饰符.(请勿将private用作访问修饰符)
2-检查Marketing类的名称空间-它应该与其他类相同.
Dear,
Check conditions:
1- Check Marketing class access modifier.(don''t use private as access modifier)
2- Check Marketing class namespace-it should same as other class. if not, add reference by "Using" keyword in current file.
错误非常明显;如果没有,请在当前文件中通过使用"关键字添加引用.如果您已经创建了Marketing,则只需分配
The error is very clear; if you have created that Marketing just assign
using Marketing;
您以这种形式声明所有程序集的位置;就这样
where you are declaring all your assembly in that form; that''s all
这篇关于找不到类型或名称空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文