''Chatengine'在当前的背景下不存在'有人帮我解决这个问题 [英] ' "Chatengine" does not exist in yhe current context' someone help me to solve this

查看:48
本文介绍了''Chatengine'在当前的背景下不存在'有人帮我解决这个问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 hi i ' 是asp.net的新手。现在我正试图开发一个与mailfetcher相关的项目。    global  asax页面我收到了一些错误。有一个PLZ帮我解决这个 yaar ...!



  Global.asax.cs  


使用系统;
使用 System.Threading;
使用 System.Collections;
使用 System.ComponentModel;
使用 System.Web;
使用 System.Web.SessionState;

命名空间 ASPNETChat
{
/// < 摘要 >
/// Global的摘要说明。
/// < / summary >
public class Global:System.Web.HttpApplication
{
/// < 摘要 >
/// 必需的设计变量。
/// < / summary >
private System.ComponentModel.IContainer components = null ;

public Global()
{
InitializeComponent();
}
Timer ChatRoomsCleanerTimer = new System.Threading.Timer( new TimerCallback( ChatEngine .CleanChatRooms), null 3600000 3600000 );
protected void Application_Start( Object sender,EventArgs e)
{

}

protected void Session_Start( Object sender,EventArgs e)
{

}

protected void Application_BeginRequest( Object sender ,EventArgs e)
{

}

protected void Application_EndRequest( Object sender,EventArgs e)
{

}

protected void Application_AuthenticateRequest( Object sender,EventArgs e)
{

}

protected void Application_Error(对象发​​件人,EventArgs e)
{

}

受保护 void Session_End(对象发​​件人,EventArgs e)
{

}

受保护 void Application_End( Object sender,EventArgs e)
{

}

#region Web Form Designer生成代码
/// < 摘要 >
/// Desi的必需方法gner支持 - 不要使用代码编辑器修改
/// 此方法的内容。
/// < / summary >
private void InitializeComponent()
{
this .components = new System.ComponentModel.Container();
}
#endregion
}
}


i得到类型的错误: 名称'ChatEngine '在当前情况下不存在。





我尝试过:



我尝试使用timercall来解决它。但我不会出现...

解决方案

它正在寻找一个名为ChatEngine的类,你的项目中没有。如果你有它,那么你需要在页面顶部正确的使用,如果你没有它,你需要添加它,或添加对包含它的程序集的引用,并再次添加正确的使用

hi i'm new to asp.net. now i'm trying to develope a project something related to mailfetcher. in a global asax page i got some error.  some one plz help me to solve this yaar...!


Global.asax.cs


using System;
using System.Threading ;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;

namespace ASPNETChat
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

public Global()
{
InitializeComponent();
}
Timer ChatRoomsCleanerTimer=new System.Threading.Timer(new TimerCallback(ChatEngine.CleanChatRooms),null,3600000,3600000);
protected void Application_Start(Object sender, EventArgs e)
{

}

protected void Session_Start(Object sender, EventArgs e)
{

}

protected void Application_BeginRequest(Object sender, EventArgs e)
{

}

protected void Application_EndRequest(Object sender, EventArgs e)
{

}

protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{

}

protected void Application_Error(Object sender, EventArgs e)
{

}

protected void Session_End(Object sender, EventArgs e)
{

}

protected void Application_End(Object sender, EventArgs e)
{

}

#region Web Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
}
#endregion
}
}


i got this type of error: " The name 'ChatEngine' does not exist in the current context."



What I have tried:

I try to solve it by using the timercall back. but i don't y it s arise...

解决方案

It's looking for a class called ChatEngine that you don't have in your project. If you do have it then you need the correct "using" at the top of the page, if you don't have it you need to add it, or add a reference to an assembly that contains it and again add the correct "using".


这篇关于''Chatengine'在当前的背景下不存在'有人帮我解决这个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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