随笔分类 -  代码demo

asp.net读取模板文件
摘要:demo string AppDomainAppPath = HttpRuntime.AppDomainAppPath; Response.Write(AppDomainAppPath); Response.Write("<br/>"); string path = System.IO.Path.C 阅读全文

posted @ 2020-09-25 20:01 荆棘人 阅读(205) 评论(0) 推荐(0) 编辑

C#Timer任务结束后再开启下次任务demo
摘要:该代码示例的核心是演示:让Timer只有本次任务执行完毕后才开始下次任务。 Timer示例代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Thr 阅读全文

posted @ 2020-08-03 19:38 荆棘人 阅读(1389) 评论(0) 推荐(0) 编辑

C#根据属性名称获取字段的值
摘要:示例代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FanSheTest { class 阅读全文

posted @ 2020-07-10 21:41 荆棘人 阅读(1061) 评论(0) 推荐(0) 编辑

C# 自定义异常demo
摘要:本文参考:C#自定义异常 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cost.Entity.CommonModel.MyException { /// 阅读全文

posted @ 2020-06-09 16:31 荆棘人 阅读(178) 评论(0) 推荐(0) 编辑

C#二进制对象copy
摘要:代码示例: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization.Formatters.Binary; using 阅读全文

posted @ 2020-06-04 19:26 荆棘人 阅读(235) 评论(0) 推荐(0) 编辑

asp.net 缓存依赖demo
摘要:示例简述: 项目中使用的城市数据、分类数据、站点数据、项目数据等少量且不怎么会变动的数据,不愿意存在数据库。 这个时候可以考虑放在一个文件中,xml或者txt都可以,然后将数据缓存到内存,加上缓存依赖,数据文件修改 后缓存自动失效,程序访问时,可以重新访问文件加载最新数据,并再次保存到内存中。 Ci 阅读全文

posted @ 2020-06-04 19:20 荆棘人 阅读(187) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

统计

点击右上角即可分享
微信分享提示