摘要: var assemArr = AppDomain.CurrentDomain.GetAssemblies(); var assem = Assembly.GetExecutingAssembly() ; 阅读全文
posted @ 2016-05-09 15:27 zslm___ 阅读(1608) 评论(0) 推荐(0) 编辑
摘要: //数据处理接口 public interface IDal<T> where T : class { void Insert (T model); void Update(T model); void Delete(T model); T Select(Int32 id); } //MsSql接口 阅读全文
posted @ 2016-05-09 14:43 zslm___ 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 使用 Linq:var types = AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(ISecurity)))).To 阅读全文
posted @ 2016-05-09 11:06 zslm___ 阅读(702) 评论(0) 推荐(0) 编辑
摘要: public byte[] StreamToBytes(Stream stream) { byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); stream.Seek(0, SeekOrigin.Be 阅读全文
posted @ 2016-05-09 10:55 zslm___ 阅读(150) 评论(0) 推荐(0) 编辑