
LINQ
文章平均质量分 62
ws_hgo
个人爱好:篮球,看书,音乐,电影.
夫英雄者,胸怀大志,腹有良谋,有包藏宇宙之机,吞吐天地之志者也.
展开
-
LINQ Group Query
1.按照第一个字母进行分组 static void Main() { string[] words = { "blueberry", "chimpanzee", "abacus", "banana", "apple", "cheese" }; var wordG原创 2011-09-09 11:41:52 · 1123 阅读 · 0 评论 -
使用LINQ 更新 XML 节点中的信息
XML 如下 Guo Hu Shanghai PuDong Lei Hu hubei xian原创 2011-10-09 10:12:03 · 1093 阅读 · 0 评论 -
Dynamic lamdba expression
private static readonly int[] numbers = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; static void Main() { DynamicLamdbaExpressionSample1(); Dyna原创 2011-10-08 11:16:34 · 1386 阅读 · 0 评论 -
LINQ 获取当前数组中出现次数最多的元素
int[] comparValue = { 11, 22, 11, 11, 33, 11, 22 }; var query = (from num in ( from number in comparValue group numb原创 2011-10-12 16:21:54 · 4060 阅读 · 0 评论 -
LINQ To DataTable
static DataTable dtable = new DataTable(); static DataColumn dc = new DataColumn(); static DataRow Dr; static void Main() { Creat原创 2011-10-11 10:28:10 · 13277 阅读 · 0 评论 -
LINQ To XML
1.多采购订单 XElement elements = XElement.Load(Server.MapPath("../Linqxml/PurchaseOrders.xml")); /*示例演示如何查找具有 Type 属性等于“Shipping”的子 Address 元素原创 2011-09-29 15:33:36 · 923 阅读 · 0 评论 -
LINQ Conversion Opreator
private static readonly string[] words = { "cherry", "apple", "blueberry" }; static void Main() { UseToArray(); UseToList();原创 2011-09-11 10:38:02 · 795 阅读 · 0 评论 -
LINQ Partitioning Operator
private static readonly int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; static void Main() { UseTakeMethod(); Us原创 2011-09-11 10:04:04 · 789 阅读 · 0 评论 -
Linq Set Operator (Distinct,Intersect,Union,Expect)
class SetOpreator { private static readonly int[] numbersA = { 0, 2, 4, 5, 6, 8, 9 }; private static readonly int[] numbersB = { 1, 3,原创 2011-09-10 13:57:41 · 1161 阅读 · 0 评论 -
LINQ Element Opreator
private static readonly string[] strNumbers = { "one", "two", "three", "four", "five", "six", "seven", "eight", "zero", "ten" }; static v原创 2011-09-11 15:34:05 · 859 阅读 · 0 评论 -
LINQ Generation Opreator
static void Main() { UseRangeMethod(); UseRepeatMethod(); } public static void UseRangeMethod() { var rangeNumber =原创 2011-09-11 15:46:58 · 781 阅读 · 0 评论 -
LINQ JOIN
class Department { //Auto-implemnted propeties public int Id { get; set; } public string Name { get; set; } public override string ToString() {原创 2012-01-14 18:29:01 · 1824 阅读 · 0 评论