|
Notice
© 2005 Microsoft Corporation. All rights reserved.
Microsoft, Windows, Visual Basic, Visual C#, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries/regions.
Other product and company names mentioned herein may be the trademarks of their respective owners.
Table of Contents
目录
26. Overview of C# 3.0 (C# 3.0 概述)............................................................................................ 5
26.1 Implicitly typed local variables 隐型局部变量(Implicity typed local variables)...................................... 5
26.2 Extension methods 扩展方法............................................................................................................ 6
26.2.1 Declaring extension methods 声明扩展方法................................................................................ 6
26.2.2 Importing extension methods 导入扩展方法................................................................................ 7
26.2.3 Extension method invocations 扩展方法的调用........................................................................... 7
26.3 Lambda expressions Lambda表达式................................................................................................. 8
26.3.1 Lambda expression conversions Lambda 表达式转换................................................................ 10
26.3.2 Type inference 类型推导......................................................................................................... 11
26.3.3 Overload resolution 重载决议................................................................................................... 13
26.4 Object and collection initializers 对象和集合的初始化器................................................................. 14
26.4.1 Object initializers 对象初始化器............................................................................................... 14
26.4.2 Collection initializers 集合初始化器.......................................................................................... 16
26.5 Anonymous types 匿名类型............................................................................................................ 17
26.6 Implicitly typed arrays 隐型数组(Implicitly typed arrays).................................................................. 18
26.7 Query expressions 查询表达式....................................................................................................... 19
26.7.1 Query expression translation 查询表达式的转换....................................................................... 20
26.7.1.1 where clauses where子句................................................................................................... 21
26.7.1.2 select clauses select 子句................................................................................................... 21
26.7.1.3 group clauses group子句..................................................................................................... 21
26.7.1.4 orderby clauses orderby 子句.............................................................................................. 22
26.7.1.5 Multiple generators 多重产生器(generator) ....................................................................... 22
26.7.1.6 into clauses info 子句.......................................................................................................... 23
26.7.2 The query expression pattern 查询表达式模式.......................................................................... 23
26.7.3 Formal translation rules 正式的转换规则.................................................................................. 24
26.8 Expression trees 表达式树............................................................................................................ |