摘要: 好久没有用多线程了,好多都忘记了 记一下 带object参数的ParameterizedThreadStart: public void Start() { for (int index = 0; index < 10; index++) { #region -- 准备参数 -- List<int> list = new List<int>(); for (... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(263) 评论(0) 推荐(0)
摘要: 反射的补充 加载程序集,获取各种item 代码很明确,直接上了 using System; using System.Collections.Generic; using System.Text; using System.Reflection; namespace FanShe { public class Test { Assembly myAssembly=null; public ... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(114) 评论(0) 推荐(0)
摘要: 这两天研究了一下反射,将一个简单的反射调用记录一下,以防遗忘 直接上代码了 要被反射的类User: using System; using System.Collections.Generic; using System.Text; namespace FanShe { public class User { public User(string name) { this.Name =... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(157) 评论(0) 推荐(0)
摘要: Alpha是内部测试版,一般不向外部发布,会有很多Bug.除非你也是测试人员,否则不建议使用. 是希腊字母的第一位 表示最初级的版本 alpha就是α,beta就是β alpha版就是比beta还早的测试版,一般都是内部测试的版本 -------------------- Beta:   很容易理解就是测试版,这个阶段的版本会一直加入新的功能。 RC:(Release Candidate... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(1405) 评论(0) 推荐(1)
摘要: 页面对客户端做304缓存 核心代码 1 HttpRuntimeSection runtime = new System.Web.Configuration.HttpRuntimeSection(); 2 runtime.EnableKernelOutputCache = false; 3 Response.Cache.SetLastModified(DateTime.Now); 4 Respons... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(218) 评论(0) 推荐(0)
摘要: 为什么要用反射呢,既然在开发时就能够写好代码,干嘛还放到运行期去做,不光繁琐,而且效率也受影响。 带着这个疑问,google了一把,找到一个非常好的解释: 1)当你做一个软件可以安装插件的功能,你连插件的类型名称都不知道,你怎么实例化这个对象呢?因为程序是支持插件的(第三方的),在开发的时候并不知道 。所以,无法在代码中 New出来 ,但反射可以, 通过反射, 动态加载程序集, 然后读出类, 检查... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(292) 评论(0) 推荐(0)
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <tit... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(704) 评论(0) 推荐(0)
摘要: 所谓的序列化就是是将对象转换为容易传输的格式的过程,一般情况下转化打流文件,放入内存或者IO文件中。例如,可以序列化一个对象,然后使用 HTTP 通过 Internet 在客户端和服务器之间传输该对象,或者和其它应用程序共享使用。反之,反序列化根据流重新构造对象。 序列化加 [Serializable]就可以了 [Serializable] public class TestInfo { ... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(126) 评论(0) 推荐(0)
摘要: 自己做个网站,发现百度的蜘蛛和Google的蜘蛛对Url的编码解码方式不一致,给我造成了很大的困惑啊, 做了一个函数,统一由此解码,世界清静了 顺便宣传一下网站地址 接龙大全 protected void Page_Load(object sender, EventArgs e) { Response.Write(UrlDecode("xxx")); } /// <summary&g... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(1155) 评论(1) 推荐(0)
摘要: 在公司里开发一些页面经常要坐分页,做了一个通用点的,备份一下,以后只要copy了 .cs端 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Te... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(164) 评论(0) 推荐(0)