代码
using System.Web;
abstract class CookieHandler
{
public CookieHandler(string domain)
{
CookieDomain = domain;
}
public string CookieDomain { get; set; }
public abstract void SetCookie(HttpContextBase context, CookieHandler value);
}
HttpContextBase 给我错误“找不到类型或命名空间 HttpContextBase” 当我尝试 HttpContext 时出现同样的错误。我想弄清楚为什么我不能再接收这个对象了。
我正在使用 .NET Framework 4.5.2 并且它有一个库类项目。
最佳答案
根据用户评论的建议,问题是我必须引用程序集 system.web.dll
关于c# - 无法找到 HttpContextBase 即使我正在使用 System.Web,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35757804/