摘要:demo string AppDomainAppPath = HttpRuntime.AppDomainAppPath; Response.Write(AppDomainAppPath); Response.Write("<br/>"); string path = System.IO.Path.C
阅读全文
摘要:该代码示例的核心是演示:让Timer只有本次任务执行完毕后才开始下次任务。 Timer示例代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Thr
阅读全文
摘要:示例代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FanSheTest { class
阅读全文
摘要:本文参考:C#自定义异常 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cost.Entity.CommonModel.MyException { ///
阅读全文
摘要:代码示例: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization.Formatters.Binary; using
阅读全文
摘要:示例简述: 项目中使用的城市数据、分类数据、站点数据、项目数据等少量且不怎么会变动的数据,不愿意存在数据库。 这个时候可以考虑放在一个文件中,xml或者txt都可以,然后将数据缓存到内存,加上缓存依赖,数据文件修改 后缓存自动失效,程序访问时,可以重新访问文件加载最新数据,并再次保存到内存中。 Ci
阅读全文