摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Lanbda表达式做参数{ class Program { static void Main(string... 阅读全文
posted @ 2015-09-16 23:22 Alfred.Xu 阅读(160) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;/*使用委托参数的实例* 1、Func是Linq的预定义的委托类型* 2、public delegate TR Func();//TR ... 阅读全文
posted @ 2015-09-16 23:09 Alfred.Xu 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 参考新浪文章http://blog.csdn.net/liuxilil/article/details/6718409--测试不可select * from [dbo].[Storage_WeiWai] where WeiWaiId not in (select RowGuid from [dbo]... 阅读全文
posted @ 2015-09-16 16:33 Alfred.Xu 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 1、添加到表insert into OrderEx_GongYi(RowGuid,OrderExId,[Type])select newid(),RowGuid,WorkItemTempleteDtailName from OrderEx2、更新到表一个表的结果更新到另一个表里,两表有关联updat... 阅读全文
posted @ 2015-09-15 08:50 Alfred.Xu 阅读(547) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;/*from let where子句* 1、from 后面接的是查询主体,可以有任何数量个,指定了额外的数据集合并引入了要在之后运算的迭... 阅读全文
posted @ 2015-09-14 20:15 Alfred.Xu 阅读(369) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Linq联接{ class Program { public class Student { ... 阅读全文
posted @ 2015-09-14 19:53 Alfred.Xu 阅读(117) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;/** 1、Linq查询结果有两种类型:一个是枚举,一个是标量(scalar)*/namespace Linq三种查询{ class ... 阅读全文
posted @ 2015-09-14 19:28 Alfred.Xu 阅读(256) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;/* 1、匿名类型只能和局部变量配合使用,不能用于类成员* 2、匿名类型没有名字,必须用var关键词作为变量类型* 3、变量声明的三种形... 阅读全文
posted @ 2015-09-14 18:17 Alfred.Xu 阅读(135) 评论(0) 推荐(0) 编辑
摘要: select a.name as 表名from sysobjects aleft join syscolumns b on a.id=b.idwhere a.xtype='U' and b.name='字段名'--查找不包含指定字段的表名select a.name as 表名from sysobje... 阅读全文
posted @ 2015-09-12 17:52 Alfred.Xu 阅读(466) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 泛型类扩展方法{ class Holder { T[] vars = new T[3]; public ... 阅读全文
posted @ 2015-09-11 17:12 Alfred.Xu 阅读(565) 评论(0) 推荐(0) 编辑