cachehelper調(diào)用時(shí)總是出錯(cuò)時(shí)為什么,提示是:System.NullReferenceException: 未將對(duì)象引用設(shè)置到對(duì)象的實(shí)例。郁悶了很久了. public static Cache cache = new Cache(); public static void Insert(string key, object obj, double Minutes) { if (obj != null) { cache.Insert(key, obj, null, DateTime.Now.AddMinutes(Minutes), Cache.NoSlidingExpiration, CacheItemPriority.High, null); } }DataSet ds; if (Cache["Rss"] == null) { string sqlStr = "select top 50 co.id,co.title,co.time,co.content,ca.category from [content] co,[category] ca where co.cateid=ca.id order by co.id desc"; ds = SQLHelper.Query(sqlStr); CacheHelper.CacheInsertAddMinutes("Rss", ds, 10); }錯(cuò)誤是:異常詳細(xì)信息: System.NullReferenceException: 未將對(duì)象引用設(shè)置到對(duì)象的實(shí)例。
cachehelper調(diào)用
慕尼黑的夜晚無(wú)繁華
2018-09-12 10:06:18