改写第一天的增删改查方法,观察增删改查的本质 1 using System; 2 using System.Collections.Generic; 3 using System.Data.Entity.Infrastructure; 4 using System.Linq; 5 using Sys...
分类:
其他好文 时间:
2014-06-17 00:30:26
阅读次数:
272
Description:You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways c...
分类:
其他好文 时间:
2014-06-15 06:37:02
阅读次数:
200
//父窗体using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.T...
using System;using System.Collections.Generic;using System.Linq;using System.Net;using...
分类:
其他好文 时间:
2014-06-14 21:37:08
阅读次数:
262
Subsets Description:Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solu...
分类:
其他好文 时间:
2014-06-14 20:14:56
阅读次数:
267
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;namespace Com.LingHu.D...
分类:
数据库 时间:
2014-06-14 17:25:40
阅读次数:
219
1 var i1 = 6; 2 //C#中的var是一个类型的简写,是根据右边进行类型的“推导” 3 //可以根据6推断出来var代表int,只是编译器自动帮我们把var换成int 4 5 //i1 ...
分类:
其他好文 时间:
2014-06-14 17:05:08
阅读次数:
160
1 //从字符串数组中将长度小于5的元素返回;2 string[] values = { "tom", "stone", "mikejiekexun", "jim", "tigerwoods" };3 var e1 = from...
分类:
其他好文 时间:
2014-06-14 16:56:51
阅读次数:
237
下面的方法都是IEnumerable的扩展方法:Average计算平均值; Min最小元素;Max最大元素;Sum元素总和; Count元素数量;Concat连接两个序列;//Unoin allContains序列是否包含指定元素;Distinct取得序列中的非重复元素;Except获得两个序列的差...
分类:
其他好文 时间:
2014-06-14 15:24:23
阅读次数:
429
语言集成查询(LINQ)是 Visual Studio2008
中引入的一组功能。可为 C# 和 Visual Basic 语言语法提供强大的查询功能。 LINQ引入了标准易学的数据查询和更新模式,可以扩展该方法来支持任何类型的数据存储。 Visual Studio 包括 LINQ 提供程序集,后者支持将 LINQ 与.NET Framework 集合、SQL Server 数据库、ADO.NE...
分类:
其他好文 时间:
2014-06-14 15:03:51
阅读次数:
249