随笔分类 -  LINQ

LINQ技术
摘要: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 云中雀 阅读(518) 评论(1) 推荐(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 云中雀 阅读(1756) 评论(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) 编辑

点击右上角即可分享
微信分享提示