摘要: Web页面,即:.aspx文件页面的根目录下,分为了5部分 [0]-{System.Web.UI.LiteralControl} [1]-{System.Web.UI.HtmlControls.HtmlHead} [2]-{System.Web.UI.LiteralControl} [3]-{System.Web.UI.HtmlControls.HtmlForm} [4]-{System.Web.UI.LiteralControl}内容依次为:[0]-{System.Web.UI.LiteralControl} <!DOCTYPE html PUBLIC "-//W3C//DT 阅读全文
posted @ 2013-06-20 17:35 武沛齐 阅读(546) 评论(0) 推荐(0) 编辑
摘要: 事件是特殊的委托委托:第一个方法注册用“=”,是赋值语法,因为要进行实例化,第二个方法注册则用的是“+=” 修饰符应该public的时候public,应该private的时候private事件:无论是否是第一个均用”+=“ 它封装了委托类型的变量,使得:在类的内部,不管你声明它是public还是protected,它总是private的。在类的外部,注册“+=”和注销“-=”的访问限定符与你在声明事件时使用的访问符相同。http://www.cnblogs.com/jimmyzhang/archive/2007/09/23/903360.html 阅读全文
posted @ 2013-06-20 16:30 武沛齐 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 不使用递归static int fun(int x1, int x2, int frequency) { int temp = 0; if (frequency <= 0) return 0; else if (frequency == 1) return x1; else if (frequency == 2) return x2; else { ... 阅读全文
posted @ 2013-06-20 16:02 武沛齐 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 关键词:延迟、当前位置保留、IEnumerable例: static void Main(string[] args) { IEnumerable ie = funyield(); foreach (string s in ie) { Console.WriteLine(s); } Console.ReadKey(); } public static IEnumerable funyield() ... 阅读全文
posted @ 2013-06-20 12:53 武沛齐 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/fly_dragon/archive/2011/02/21/1959933.htmlIEnumerable接口公开枚举器,该枚举器支持在指定类型的集合上进行简单迭代。也就是说:实现了此接口的object,就可以直接使用foreach遍历此objec... 阅读全文
posted @ 2013-06-20 11:12 武沛齐 阅读(750) 评论(0) 推荐(0) 编辑
摘要: IEnumerable接口,其中只有一个返回IEnumerator类型的方法 public interface IEnumerable { IEnumerator GetEnumerator(); } public interface IEnumerator {//获取集合中的当前元素。 object Current { get; }//将枚举数推进到集合的下一个元素。 bool MoveNext();//将枚举数设置为其初始位置,该位置位于集合中第一个元素之前。 void Reset(); }一种类型... 阅读全文
posted @ 2013-06-20 10:49 武沛齐 阅读(797) 评论(0) 推荐(0) 编辑