.net 导出
摘要:public void CreateExcel(DataTable dt, string fileName) { HttpResponse resp = System.Web.HttpContext.Current.Response; ...
阅读全文
posted @
2015-11-17 14:11
Struggling Rookie
阅读(115)
推荐(0)
asp.net运行原理
摘要:从更低的角度这篇文章在一个底层的角度来关注一个web请求怎样到达asp.net框架,从web服务器,通过ISAPI。看看这些后面发生了什么,让我们停止对asp.net的黑箱猜想。ASP.NET是一个非常强大用来创建web应用程序的平台,它为创建web应用程序提供了大量的灵活强大的支持。大多数人仅仅熟...
阅读全文
posted @
2014-12-01 10:08
Struggling Rookie
阅读(414)
推荐(0)
锁
摘要:防止多个线程同时访问同意对象//1.创建一个锁对象,锁对象必须是一个引用类型static readonly object objSync=new object();Thread t1=new Thread(new ThreadStart(()=>{ lock(objSync) { 代码块 ...
阅读全文
posted @
2014-11-19 16:56
Struggling Rookie
阅读(102)
推荐(0)
多线程
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u...
阅读全文
posted @
2014-11-19 10:47
Struggling Rookie
阅读(84)
推荐(0)
文件流复习
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u...
阅读全文
posted @
2014-11-19 10:26
Struggling Rookie
阅读(102)
推荐(0)
委托复习
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _02_委托复习 { class Program { static void Main(string[] args...
阅读全文
posted @
2014-11-19 10:25
Struggling Rookie
阅读(102)
推荐(0)
foreach遍历
摘要:想要实现Foreach遍历循环1.需要让该类型实现一个名字叫IEnumberable的接口,实现该接口的目的是实现 GetEnumerator方法。GetEnumerator() 这个方法就是获取一个“枚举器”枚举器 实现IEnumberator
阅读全文
posted @
2014-10-23 11:14
Struggling Rookie
阅读(141)
推荐(0)
好的正则
摘要:验证数字的正则表达式集 验证数字:^[0-9]*$验证n位的数字:^\d{n}$验证至少n位数字:^\d{n,}$验证m-n位的数字:^\d{m,n}$验证零和非零开头的数字:^(0|[1-9][0-9]*)$验证有两位小数的正实数:^[0-9]+(.[0-9]{2})?$验证有1-3位小数的正实数...
阅读全文
posted @
2014-09-16 15:42
Struggling Rookie
阅读(149)
推荐(0)
linq in not in
摘要:1、not in:lstDown中的DownID属性值不在lstDownfb中的DownIDvar lstDown2 = (from d in lstDown where !(from d2 in lstDownfb select d2.DownID).Contains(d.DownID) sele...
阅读全文
posted @
2014-09-10 16:50
Struggling Rookie
阅读(126)
推荐(0)
xml
摘要:一:如果不想有转意 则用CDATA 王五]]> 1 #region 通过编程方式实现xml写入 2 ////1.在内存中构建一个Dom对象 3 //XmlDocument xmlDoc = new XmlDocument(); 4 ...
阅读全文
posted @
2014-09-09 18:31
Struggling Rookie
阅读(137)
推荐(0)
反射
摘要://1.动态加载程序集 Assembly ams = Assembly.LoadFile(@"c:\反射复习.dll"); //2.获取类型 //Type[] t = ams.GetTypes(); //获取所有公共类型的 //Type[] t = ams.GetExporte...
阅读全文
posted @
2014-09-09 15:12
Struggling Rookie
阅读(131)
推荐(0)
Cookie
摘要:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebContro...
阅读全文
posted @
2014-09-05 15:53
Struggling Rookie
阅读(102)
推荐(0)
日志
摘要:public BDMSSystemException(string message, Exception innerException) { if (!string.IsNullOrEmpty(message)) { string path = string.Empty; if (n...
阅读全文
posted @
2014-09-05 09:07
Struggling Rookie
阅读(107)
推荐(0)