以下是我在appcode中的部分代码:systemparam.cs using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Web; using System.Configuration; using Newtonsoft.Json; using System.Text; using System.Security.Cryptography; /// <summary> ///系统常用静态参数和方法 /// </summary> public class systemparam { public static int deleted = int.Parse(ConfigurationManager.AppSettings["deleted"]); } 以下是我在程序集(类库)中的代码:uu.csusing System; using System.Web; using System.Collections.Generic; using System.Web.SessionState; sysbutton.Deleted = systemparam.deleted; // 这一句中【systemparam】的错误提示为,上下文找不到“systemparam” 到底需要引用哪些dll或命名空间,求指点!
命名空间一样么?namespace xxx { public class systemparam { } } 这个是什么?和你的调用处的一样么?不同的话,先using xxx;
类库引用网站appcode的类,各位都试过吗?是否可以?我希望得到一个肯定的回答,如果可以,应该注意什么地方?
希望试过的高手给予解答,谢谢了!
以下是我在appcode中的部分代码:systemparam.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using Newtonsoft.Json;
using System.Text;
using System.Security.Cryptography;
/// <summary>
///系统常用静态参数和方法
/// </summary>
public class systemparam
{
public static int deleted = int.Parse(ConfigurationManager.AppSettings["deleted"]);
}
以下是我在程序集(类库)中的代码:uu.csusing System;
using System.Web;
using System.Collections.Generic;
using System.Web.SessionState; sysbutton.Deleted = systemparam.deleted; // 这一句中【systemparam】的错误提示为,上下文找不到“systemparam”
到底需要引用哪些dll或命名空间,求指点!
{
public class systemparam
{
}
}
这个是什么?和你的调用处的一样么?不同的话,先using xxx;
版主【caozhy】,楼上说的对吗?
我的appcode程序中有LinQ的DataClass.dbml,每次读数据时,而我又想把读数据的程序放在程序集中,因此,必须调用DataClass.designer.cs是的表类,难道要把DataClass.dbml也放到一个程序集吗?
再次请教权威人士给肯定回答。
将该类的属性-->生成操作,从“内容”改为“编译”即可调用。
不需要引入命名空间,只要在同一命名空间即可。