摘要: #region Linq to 集合查询非泛型集合要指定Student类型 //ArrayList list = new ArrayList(); //list.Add(new Student { Name = "Tom", Age = 17 }); //list.Add(new Student ... 阅读全文
posted @ 2015-03-25 19:31 914556495 阅读(295) 评论(0) 推荐(0) 编辑
摘要: #region Linq to 泛型集合查询集合包括大写M和年龄小于等于18 //List list = new List(); //list.Add(new Student { Name = "Tom", Age = 17 }); //list.Add(new Student { Name = ... 阅读全文
posted @ 2015-03-25 19:22 914556495 阅读(322) 评论(0) 推荐(0) 编辑
摘要: #region Linq to 字符串char.IsUpper意思是判断是否大写 //string strDemo = "HelloWord!"; //var query = from n in strDemo // where char.IsUpper(n) // select n; //for... 阅读全文
posted @ 2015-03-25 19:15 914556495 阅读(300) 评论(0) 推荐(0) 编辑
摘要: #region linq to 数组 //定义数组,并初始化 string [] array = new string []{"Juan", "Mike", "Tom", "John", "Andy"}; //查询首字母是J的名称 //var result = from n in array //... 阅读全文
posted @ 2015-03-25 19:04 914556495 阅读(3234) 评论(0) 推荐(0) 编辑