- 博客(7)
- 资源 (1683)
- 收藏
- 关注
原创 C#3.0之LINQ(1)
LINQ,即Language Integrated Query。很多人熟悉SQL语言,用它来操作数据库非常方便。现在在C#3.0中也可以使用相同的语法来操作各种数据,包括数组,文件,数据库等。由于LINQ的东西比较多,准备分三次讲,第一次主要介绍一下LINQ,第二次主要介绍用LINQ操作数据库,第三次主要介绍用LINQ操作XML,第四次主要介绍LINQ的一些函数应用。有时间在写一些关于LINQ的
2007-07-31 23:22:00 1320 3
原创 C#3.0之Lambda表达式
随着编程语言的演进,我们可以看到一个非常明显的趋势:让计算机去理解程序员,而不是程序员去理解计算机。从C#3.0中Lambda表达式可以明显看出这一点来。现在看个例子://使用C# 2.0 中的匿名方法查找“内部包含Lambda子串的所有字符串”:list.FindAll(delegate(string s) ...{return s.Indexof(“Lambda”) > =0; }
2007-07-26 13:55:00 1433
原创 C#3.0之匿名类型
C#3.0允许我们在局部声明匿名类,这样我们可以简单的存储一些数据。看一下例子: var p1 = new ...{ Name = "Lawnmower", Price = 495.00 }var p2 = new ...{ Name = "Shovel", Price = 26.95 };p1 = p2;//p1,p2为匿名类,可以使用new创建一个匿名类的对象匿名类直接
2007-07-25 15:32:00 945
原创 C#3.0之对象与集合初始化
我们知道在C#2.0中要初始化一个对象可以用构造器,或者声明公有属性,然后在new一个对象之后在对属性赋值。必须一步一步的来,在C#3.0中可以有一种很简单的方法对对象和集合进行初始化工作。看个例子: public class Point ...{int x, y;public int X ...{ get ...{ return x; } set ...{ x = value;
2007-07-25 07:56:00 925
原创 C#3.0之扩展方法
我们知道在一个类写好之后,在想为这个类加一些新的实例方法,几乎是不可能的,那还得重新编译这个类。而在C#3.0中这个问题得到了很好的解决,使用扩展方法可以轻松的为某个类进行实例方法的扩展。先看一个例子: //注意只有静态类中的方法才能使用扩展方法public static class Extensions......{public static void Foo(this s
2007-07-24 12:56:00 852
原创 C#3.0之隐含类型局部变量
我们知道语言大概可以分为两大类:强类型语言,譬如C#,JAVA,C等和弱类型语言,譬如javascript强类型语言每个变量必须有明确的类型,如int,double等,而弱类型语言则没有这样的要求,譬如JS中的类型都可以是var。微软在C#3.0中引入的一个新的关键字"var",可以代表任何类型,但是请不要认为C#在往弱类型化发展,这里的"var"和JS中的"var"有本质区别的。下面先看几个
2007-07-23 16:10:00 959
原创 C#3.0初探
作为一个.NET的初学者,很关注微软.NET平台的发展,也对这个平台很有兴趣。.NET平台给我们带来了很多的惊喜,避免了J2E平台的垄断地位,虽然说微软的.NET平台在最初开始的时候有仿造之嫌,但是随着.NET的发展,我们看到了越来越多的和J2E平台的不同之处。两大平台各有各的好处,没有必要争论谁比谁更好一些。选择一个喜欢的,深入研究下去,总会有所成就。Just do it!作为.NET
2007-07-23 10:41:00 905 1
Functional Programming in Swift (2014-10-01)
2015-05-21
The.Creation.and.Science.of.Web.Design.Jan.2009
2009-02-28
Packt.Publishing.Learning.Website.Development.with.Django.Mar.2008
2009-02-28
MS - Microsoft SQL Server 2008 T-SQL Fundamentals (2008.10).
2009-02-28
Microsoft Press - Microsoft Visual C# 2008 Express Edition Build a Program Now!.
2009-02-28
Microsoft .NET Architecting Applications for the Enterprise
2009-02-28
GoF Design Patterns with examples using Java and UML2
2009-02-28
Exploring C++ The Programmer’s Introduction to C++.
2009-02-28
Developing Service-Oriented AJAX Applications on the Microsoft Platform
2009-02-28
Building the Agile Enterprise With SOA, BPM and MBM
2009-02-28
Apress.Pro.Oracle.Application.Express.Sep.2008.eBook-DDU
2009-02-28
jQuery UI 1.6 - The User Interface Library for jQuery (Feb 2009)
2009-02-23
iPhone Open Application Development Second Edition
2009-02-23
I.O.U.S.A. One Nation. Under Stress. In Debt
2009-02-23
Delivering Business Intelligence with Microsoft SQL Server(TM) 2E 2008
2009-02-23
Apress[1].Pro.JavaScript.Design.Patterns.Dec.2007
2009-02-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人