笔者遇到的一个问题,dll文件在客户端可以加载成功,在web端引用程序报错.解决方法:利用反射动态加载dll 头部引用加: using System.Reflection; 主要代码: Assembly asm = Assembly.LoadFrom(AppDomain.CurrentDomain.BaseDirectory+ "/DeclareDLL/YunDouTaxLib.dll");////我们要调用的dll文件路径 //加载dll后,需要使用dll中某类. Type t =
1.在写一个记录日志到文件中的类库(生成dll文件copy到一个目录中去,然后在主函数的appconfig中去配置. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WriteToTxtLib { public class WriteLog { public v
在SQLite官方下载了System.Data.SQLite,编写如下测试代码: 复制内容到剪贴板 程序代码 using (SQLiteConnection conn = new SQLiteConnection(@"Data Source=F:\my.db;Pooling=true;FailIfMissing=false")){ using (SQLiteDataAdapter adapter = new SQLiteDataAdapter("select id,to