本文介绍了asp.net中的CS0103错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个班级



I have a class

public class DictN
{

public static Dictionary<int,navial> checkne=new Dictionary<int,navial>();

public DictN()
{

}
}





NAvial是struct



上面的类在App_code文件夹中定义



我称之为



DictN.checkne.Clear();







我还在项目根路径中复制了DictN.cs类文件



但我收到错误



'/'应用程序中的服务器错误。



编译错误



描述:编译服务此请求所需的资源时发生错误。请查看以下特定错误详细信息并相应地修改源代码。



编译器错误消息:CS0103:当前上下文中不存在名称'DictN'



来源错误:







NAvial is struct

the above class is defined in App_code folder

I call it is

DictN.checkne.Clear();

In

I have also copied the DictN.cs class file in project root path

but i get error as

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0103: The name 'DictN' does not exist in the current context

Source Error:


Line 101:        XmlNodeList parentNode = xmlDoc.GetElementsByTagName("hotel");
Line 102:
Line 103: DictN.checkne.Clear(); Line 104:
Line 105:        int ij=0;



请咨询问题是什么







此错误发生在服务器


Pls advice what the problem is



This error is at server

推荐答案


这篇关于asp.net中的CS0103错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 01:43