摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace ConsoleApplication1{ static class Book { public static Double ToDouble(this string s) { return Double.Parse(s); } } class Program { static void Main(string[] args) { Console.WriteLine 阅读全文
posted @ 2011-05-24 19:08 云中雀 阅读(515) 评论(1) 推荐(0) 编辑
摘要: Http请求刚刚到达服务器的时候 当服务器接收到一个Http请求的时候,IIS首先需要决定如何去处理这个请求(Note: 服务器处理一个.htm页面和一个.aspx页面肯定是不一样的么)。那IIS依据什么去处理?-----根据文件的后缀名。 服务器获取所请求的页面(Note: 也可以是文件,比如jimmy.jpg)的后缀名以后,接下来会在服务器端寻找可以处理这类后缀名的应用程序,如果IIS找不到可以处理此类文件的应用程序,并且这个文件也没有受到服务器端的保护(Note:一个受保护的例子就是App_Code中的文件,一个不受保护的例子就是你的js脚本),那么IIS将直接把这个文件返还给客户端。 阅读全文
posted @ 2011-05-24 17:27 云中雀 阅读(569) 评论(0) 推荐(0) 编辑
摘要: 1. var(隐式类型)例如: var temp ="abc"; //正确, var temp;temp = "abc" //错误 原因:隐式类型其实就是根据=右边的数据类型来确定左边的数据类型2. 匿名类型 var与new关键字一起使用时,就可以创建匿名类型。匿名类型只是一个继承了object的,没有名称的类,该类的定义从初始化器中推断. 例: var book = new{Name ="js",Price = 100} var bookA = new{Name = "c#",Price = 200} Conso 阅读全文
posted @ 2011-05-24 14:45 云中雀 阅读(1750) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace ConsoleApplication1{ public class Common { //定义一个委托 public delegate bool IntFilter(int i); public static int[] FilterArrayOfInts(int[] ints, IntFilter filter) { ArrayList alist = new 阅读全文
posted @ 2011-05-24 11:51 云中雀 阅读(1490) 评论(0) 推荐(0) 编辑