摘要: 以下用代理买火车票作为例子using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace TestApp.ProxyDemo{ public partial class Index : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ... 阅读全文
posted @ 2012-12-23 23:03 玻璃鱼儿 阅读(182) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Threading;using System.Runtime.Remoting.Messaging;using System.IO;namespace TestApp.ResponseHeader{ public partial class Demo : System.Web.UI.Page {... 阅读全文
posted @ 2012-12-23 22:43 玻璃鱼儿 阅读(193) 评论(0) 推荐(0) 编辑
摘要: public class Cat { public delegate void MaojiaoHandler(); public event MaojiaoHandler Maojiao; public void RaiseMaojiaoEvent() { if (Maojiao != null) //不等于空说明有客户订阅了该事件 { Delegate[] dels = Maojiao.GetInvocationList(); ... 阅读全文
posted @ 2012-12-23 22:39 玻璃鱼儿 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 以下代码是个人对装饰模式的理解,备忘using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace TestApp.装饰{ public partial class 装饰2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ... 阅读全文
posted @ 2012-12-23 22:30 玻璃鱼儿 阅读(129) 评论(2) 推荐(0) 编辑