C# Language Specification 5.0 (翻译)目录
引言
**[第一章 引言](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.html "C# Language Specification 5.0 (翻译)第一章 引言")**(2015年07月08日) [1.1 Hello World](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_1 "Hello World") [1.2 程序结构](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_2 "Program structure") [1.3 类型与变量](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_3 "Types and variables") [1.4 表达式 Expressions](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_4 "Expressions") [1.5 语句 Statements](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_5 "Statements") [1.6 类与对象](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_6 "Classes and objects") [1.6.1 成员](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_7 "Members") [1.6.2 访问控制修饰符](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_8 "Accessibility") [1.6.3 类型参数](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_9 "Type parameters") [1.6.4 基类 Base classes](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_10 "Base classes") [1.6.5 字段 Fields](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_11 "Fields") [1.6.6 方法 Methods](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_12 "Methods") [1.6.6.1 形参 Parameters](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_13 "Parameters") [1.6.6.2 方法体与局部变量](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_14 "Method body and local variables") [1.6.6.3 静态方法与实例方法](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_15 "Static and instance methods") [1.6.6.4 虚、重写与抽象方法](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_16 "Virtual, override, and abstract methods") [1.6.6.5 方法重载](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_17 "Method overloading") [1.6.7 其它函数成员](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_18 "Other function members ") [1.6.7.1 构造器 Constructors](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_19 "Constructors") [1.6.7.2 属性 Properties](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_20 "Properties") [1.6.7.3 索引器 Indexers](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_21 "Indexers") [1.6.7.4 事件 Events](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_22 "Events") [1.6.7.5 操作数 Operators](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_23 "Operators") [1.6.7.6 析构函数 Destructors](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_24 "Destructors") [1.7 结构 Structs](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_25 "Structs") [1.8 数组 Arrays](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_26 "Arrays") [1.9 接口 Interfaces](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_27 "Interfaces") [1.10 枚举 Enums](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_28 "Enums") [1.11 委托 Delegates](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_29 "Delegates") [1.12 特性 Attributes](http://www.cnblogs.com/forerunner/p/csls5-1-introduction.htm#nav_30 "Attributes")词法结构
**[第二章 词法结构](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.html "C# Language Specification 5.0 (翻译)第二章 词法结构")**(2015年07月13日) [2.1 程序](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_1 "Program") [2.2 文法](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_2 "Grammars") [2.2.1 文法表示法](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_3 "Grammar notation") [2.2.2 词法文法](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_4 "Lexical grammar") [2.2.3 句法文法](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_5 "Syntactic grammar") [2.3 词法分析](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_6 "Lexical analysis") [2.3.1 行终结符](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_7 "Line terminators") [2.3.2 注释](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_8 "Comments") [2.3.3 空白](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_9 "White space") [2.4 标记](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_10 "Tokens") [2.4.1 Unicode 字符转义序列](http://www.cnblogs.com/forerunner/p/csls5-11-Lexical_structure.htm#nav_2 "Unicode character escape sequences") [2.4.2 标识符](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_12 "Identifiers") [2.4.3 关键字](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_13 "Keywords") [2.4.4 文本](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_14 "Literals") [2.4.4.1 布尔值](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav15 "Boolean literals") [2.4.4.2 整数](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_16 "Integer literals") [2.4.4.3 实数](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_17 "Real literals") [2.4.4.4 字符](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_18 "Character literals") [2.4.4.5 字符串](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_19 "String literals") [2.4.4.6 空 null](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_20 "The null literal") [2.4.5 操作符与标点符](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_21 "Operators and punctuators") [2.5 预处理指令](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_22 "Pre-processing directives") [2.5.1 条件编译符号](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_23 "Conditional compilation symbols") [2.5.2 预处理表达式](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_24 "Pre-processing expressions") [2.5.3 声明指令](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_25 "Declaration directives") [2.5.4 条件编译指令](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_26 "Conditional compilation directives") [2.5.5 诊断指令](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_27 "Diagnostic directives") [2.5.6 区域指令](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_28 "Region directives") [2.5.7 行指令](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_29 "Line directives") [2.5.8 编译指示指令](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_30 "Pragma directives") [2.5.8.1 编译指示警告](http://www.cnblogs.com/forerunner/p/csls5-2-Lexical_structure.htm#nav_31 "Pragma warning")基本概念
**[第三章 基本概念](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html "C# Language Specification 5.0 (翻译)第三章 基本概念")**(2015年07月21日) [3.1 应用程序启动](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_1 "Application Startup") [3.2 应用程序终止](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_2 "Application termination") [3.3 声明](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_3 "Declarations") [3.4 成员](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_4 "Members") [3.4.1 命名空间成员](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_5 "Namespace members") [3.4.2 结构成员](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_6 "Struct members") [3.4.3 枚举成员](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_7 "Enumeration members") [3.4.4 类成员](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_8 "Class members") [3.4.5 接口成员](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_9 "Interface members") [3.4.6 数组成员](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_10 "Array members") [3.4.7 委托成员](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_11 "Delegate members") [3.5 成员访问](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_12 "Member access") [3.5.1 声明的可访问性](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_13 "Declared accessibility") [3.5.2 可访问域](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_14 "Accessibility domains") [3.5.3 实例成员的受保护访问](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_15 "Protected access for instance members") [3.5.4 可访问性约束](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_16 "Accessibility constraints") [3.6 签名与重载](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_17 "Signatures and overloading") [3.7 作用域](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_18 "Scopes") [3.7.1 名称隐藏](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_19 "Name hiding") [3.7.1.1 通过嵌套隐藏](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_20 "Hiding through nesting") [3.7.1.2 通过继承隐藏](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_21 "Hiding through inheritance") [3.8 命名空间与类型名](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_22 "Namespace and type names") [3.8.1 完全限定名](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_23 "Fully qualified names") [3.9 自动内存管理](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_24 "Automatic memory management") [3.10 执行顺序](http://www.cnblogs.com/forerunner/p/csls5-3-Basic_Concepts.html#nav_25 "Execution order")类型
**[第四章 类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html "C# Language Specification 5.0 (翻译)第四章 类型")**(2015年07月28日) [4.1 值类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_1 "Value types") [4.1.1 System.ValueType 类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_2 "The System.ValueType type") [4.1.2 默认构造函数](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_3 "Default constructors") [4.1.3 结构类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_4 "Struct types") [4.1.4 简单类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_5 "Simple types") [4.1.5 整数类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_6 "Integral types") [4.1.6 浮点数类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_7 "Floating point types") [4.1.7 decimal 类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_8 "The decimal type") [4.1.8 布尔类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_9 "The bool type") [4.1.9 枚举类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_10 "Enumeration types") [4.1.10 可空类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_11 "Nullable types") [4.2 引用类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_12 "Reference types") [4.2.1 类类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_13 "Class types") [4.2.2 对象类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_14 "The object type") [4.2.3 dynamic 类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_15 "The dynamic type") [4.2.4 字符串类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_16 "The string type") [4.2.5 接口类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_17 "Interface types") [4.2.6 数组类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_18 "Array types") [4.2.7 委托类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_19 "Delegate types") [4.3 装箱与拆箱](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_20 "Boxing and unboxing") [4.3.1 装箱转换](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_21 "Boxing conversions") [4.3.2 拆箱转换](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_22 "Unboxing conversions") [4.4 构造类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_23 "Constructed types") [4.4.1 类型实参](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_24 "Type arguments") [4.4.2 开放与封闭类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_25 "Open and closed types") [4.4.3 绑定与未绑定类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_26 "Bound and unbound types") [4.4.4 满足约束](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_27 "Satisfying constraints") [4.5 类型形参](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_28 "Type parameters") [4.6 表达式树类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_29 "Expression tree types") [4.7 dynamic 类型](http://www.cnblogs.com/forerunner/p/csls5-4-Types.html.html#nav_30 "The dynamic type")变量
**[第五章 变量](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html "C# Language Specification 5.0 (翻译)第五章 变量")**(2015年08月12日) [5.1 变量种类](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_1 "Variable categories") [5.1.1 静态变量 ](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_2 "Static variables") [5.1.2 实例变量](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_3 "Instance variables") [5.1.2.1 类中的实例变量](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_4 "Instance variables in classes") [5.1.2.2 结构中的实例变量](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_5 "Instance variables in structs") [5.1.3 数组元素](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_6 "Array elements") [5.1.4 值参数](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_7 "Value parameters") [5.1.5 引用参数](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_8 "Reference parameters") [5.1.6 输出参数](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_9 "Output parameters") [5.1.7 局部变量](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_10 "Local variables") [5.2 默认值](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_11 "Default values") [5.3 明确赋值](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_12 "Definite assignment") [5.3.1 初始已赋值变量](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_13 "Initially assigned variables") [5.3.2 初始未赋值变量](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_14 "Initially unassigned variables") [5.3.3 明确赋值的详细规则](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_15 "Precise rules for determining definite assignment") [5.3.3.1 一般语句规则](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_16 "General rules for statements") [5.3.3.2 块、checked 与 unchecked 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_17 "Block statements, checked, and unchecked statements") [5.3.3.3 表达式语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_18 "Expression statements") [5.3.3.4 声明语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_19 "Declaration statements") [5.3.3.5 if 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_20 "If statements") [5.3.3.6 switch 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_21 "Switch statements") [5.3.3.7 while 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_22 "While statements") [5.3.3.8 do 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_23 "Do statements") [5.3.3.9 for 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_24 "For statements") [5.3.3.10 break、continue 与 goto 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_25 "Break, continue, and goto statements") [5.3.3.11 throw 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_26 "Throw statements") [5.3.3.12 return 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_27 "Return statements") [5.3.3.13 try-catch 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_28 "Try-catch statements") [5.3.3.14 try-finally 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_29 "Try-finally statements") [5.3.3.15 try-catch-finally 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_30 "Try-catch-finally statements") [5.3.3.16 foreach 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_31 "Foreach statements") [5.3.3.17 using 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_32 "Using statements") [5.3.3.18 lock 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_33 "Lock statements") [5.3.3.19 yield 语句](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_34 "Yield statements") [5.3.3.20 简单表达式的一般规则](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_35 "General rules for simple expressions") [5.3.3.21 带嵌入表达式的表达式一般规则](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_36 "General rules for expressions with embedded expressions") [5.3.3.22 调用表达式与对象创建表达式](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_37 "Invocation expressions and object creation expressions") [5.3.3.23 简单赋值表达式](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_38 "Simple assignment expressions") [5.3.3.24 && 表达式](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_39 "&& expressions") [5.3.3.25 || 表达式](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_40 "|| expressions") [5.3.3.26 ! 表达式](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_41 "! expressions") [5.3.3.27 ?? 表达式](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_42 "?? expressions") [5.3.3.28 ?: 表达式](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_43 "?: expressions") [5.3.3.29 匿名函数](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_44 "Anonymous functions") [5.4 变量引用](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_45 "Variable references") [5.5 变量引用的原子性](http://www.cnblogs.com/forerunner/p/csls5-5-Variables.html.html#nav_46 "Atomicity of variable references")转换
**[第六章 转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html "C# Language Specification 5.0 (翻译)第六章 转换")**(2015年09月15日) [6.1 隐式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_1 "Implicit conversions") [6.1.1 标识转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_2 "Identity conversion") [6.1.2 隐式数值转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_3 "Implicit numeric conversions") [6.1.3 隐式枚举转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_4 "Implicit enumeration conversions") [6.1.4 隐式可空值转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_5 "Implicit nullable conversions") [6.1.5 空值文本转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_6 "Null literal conversions") [6.1.6 隐式引用转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_7 "Implicit reference conversions") [6.1.7 装箱转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_8 "Boxing conversions") [6.1.8 隐式动态转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_9 "Implicit dynamic conversions") [6.1.9 隐式常量表达式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_10 "") [6.1.10 涉及类型形参的隐式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_11 "Implicit conversions involving type parameters") [6.1.11 用户定义隐式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_12 "User-defined implicit conversions") [6.1.12 匿名函数转换与方法组转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_13 "Anonymous function conversions and method group conversions") [6.2 显式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_17 "Explicit conversions") [6.2.1 显式数值转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_18 "Explicit numeric conversions") [6.2.2 显式枚举转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_19 "Explicit enumeration conversions") [6.2.3 显式可空值转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_20 "Explicit nullable conversions") [6.2.4 显式引用转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_21 "Explicit reference conversions") [6.2.5 拆箱转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_22 "Unboxing conversions") [6.2.6 显式动态转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_23 "Explicit dynamic conversions") [6.2.7 涉及类型形参的显式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_24 "Explicit conversions involving type parameters") [6.2.8 用户定义显式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_25 "User-defined explicit conversions") [6.3 标准转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_26 "Standard conversions") [6.3.1 标准隐式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_27 "Standard implicit conversions") [6.3.2 标准显式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_28 "Standard explicit conversions") [6.4 用户定义转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_29 "User-defined conversions") [6.4.1 许可的用户定义转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_30 "Permitted user-defined conversions") [6.4.2 提升转换操作符](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_31 "Lifted conversion operators") [6.4.3 用户定义转换的计算](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_32 "Evaluation of user-defined conversions") [6.4.4 用户定义隐式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_33 "User-defined implicit conversions") [6.4.5 用户定义显式转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_34 "User-defined explicit conversions") [6.5 匿名函数转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_35 "Anonymous function conversions") [6.5.1 匿名函数转换为委托类型的计算](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_36 "Evaluation of anonymous function conversions to delegate types") [6.5.2 匿名函数转换为表达式树类型的计算](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_37 "Evaluation of anonymous function conversions to expression tree types") [6.5.3 实现举例](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_38 "Implementation example") [6.6 方法组转换](http://www.cnblogs.com/forerunner/p/csls5-6-Conversions.html.html#nav_39 "Method group conversions")表达式 Expressions
7.1 Expression classifications
7.1.1 Values of expressions
7.2 Static and Dynamic Binding
7.2.1 Binding-time
7.2.2 Dynamic binding
7.2.3 Types of constituent expressions
7.3 Operators
7.3.1 Operator precedence and associativity
7.3.2 Operator overloading
7.3.3 Unary operator overload resolution
7.3.4 Binary operator overload resolution
7.3.5 Candidate user-defined operators
7.3.6 Numeric promotions
7.3.6.1 Unary numeric promotions
7.3.6.2 Binary numeric promotions
7.3.7 Lifted operators
7.4 Member lookup
7.4.1 Base types
7.5 Function members
7.5.1 Argument lists
7.5.1.1 Corresponding parameters
7.5.1.2 Run-time evaluation of argument lists
7.5.2 Type inference
7.5.2.1 The first phase
7.5.2.2 The second phase
7.5.2.3 Input types
7.5.2.4 Output types
7.5.2.5 Dependence
7.5.2.6 Output type inferences
7.5.2.7 Explicit parameter type inferences
7.5.2.8 Exact inferences
7.5.2.9 Lower-bound inferences
7.5.2.10 Upper-bound inferences
7.5.2.11 Fixing
7.5.2.12 Inferred return type
7.5.2.13 Type inference for conversion of method groups
7.5.2.14 Finding the best common type of a set of expressions
7.5.3 Overload resolution
7.5.3.1 Applicable function member
7.5.3.2 Better function member
7.5.3.3 Better conversion from expression
7.5.3.4 Better conversion from type
7.5.3.5 Better conversion target
7.5.3.6 Overloading in generic classes
7.5.4 Compile-time checking of dynamic overload resolution
7.5.5 Function member invocation
7.5.5.1 Invocations on boxed instances
7.6 Primary expressions
7.6.1 Literals
7.6.2 Simple names
7.6.2.1 Invariant meaning in blocks
7.6.3 Parenthesized expressions
7.6.4 Member access
7.6.4.1 Identical simple names and type names
7.6.4.2 Grammar ambiguities
7.6.5 Invocation expressions
7.6.5.1 Method invocations
7.6.5.2 Extension method invocations
7.6.5.3 Delegate invocations
7.6.6 Element access
7.6.6.1 Array access
7.6.6.2 Indexer access
7.6.7 This access
7.6.8 Base access
7.6.9 Postfix increment and decrement operators
7.6.10 The new operator
7.6.10.1 Object creation expressions
7.6.10.2 Object initializers
7.6.10.3 Collection initializers
7.6.10.4 Array creation expressions
7.6.10.5 Delegate creation expressions
7.6.10.6 Anonymous object creation expressions
7.6.11 The typeof operator
7.6.12 The checked and unchecked operators
7.6.13 Default value expressions
7.6.14 Anonymous method expressions
7.7 Unary operators
7.7.1 Unary plus operator
7.7.2 Unary minus operator
7.7.3 Logical negation operator
7.7.4 Bitwise complement operator
7.7.5 Prefix increment and decrement operators
7.7.6 Cast expressions
7.8 Arithmetic operators
7.8.1 Multiplication operator
7.8.2 Division operator
7.8.3 Remainder operator
7.8.4 Addition operator
7.8.5 Subtraction operator
7.9 Shift operators
7.10 Relational and type-testing operators
7.10.1 Integer comparison operators
7.10.2 Floating-point comparison operators
7.10.3 Decimal comparison operators
7.10.4 Boolean equality operators
7.10.5 Enumeration comparison operators
7.10.6 Reference type equality operators
7.10.7 String equality operators
7.10.8 Delegate equality operators
7.10.9 Equality operators and null
7.10.10 The is operator
7.10.11 The as operator
7.11 Logical operators
7.11.1 Integer logical operators
7.11.2 Enumeration logical operators
7.11.3 Boolean logical operators
7.11.4 Nullable boolean logical operators
7.12 Conditional logical operators
7.12.1 Boolean conditional logical operators
7.12.2 User-defined conditional logical operators
7.13 The null coalescing operator
7.14 Conditional operator
7.15 Anonymous function expressions
7.15.1 Anonymous function signatures
7.15.2 Anonymous function bodies
7.15.3 Overload resolution
7.15.4 Anonymous functions and dynamic binding
7.15.5 Outer variables
7.15.5.1 Captured outer variables
7.15.5.2 Instantiation of local variables
7.15.6 Evaluation of anonymous function expressions
7.16 Query expressions
7.16.1 Ambiguities in query expressions
7.16.2 Query expression translation
7.16.2.1 Select and groupby clauses with continuations
7.16.2.2 Explicit range variable types
7.16.2.3 Degenerate query expressions
7.16.2.4 From, let, where, join and orderby clauses
7.16.2.5 Select clauses
7.16.2.6 Groupby clauses
7.16.2.7 Transparent identifiers
7.16.3 The query expression pattern
7.17 Assignment operators
7.17.1 Simple assignment
7.17.2 Compound assignment
7.17.3 Event assignment
7.18 Expression
7.19 Constant expressions
7.20 Boolean expressions
声明 Statements
8.1 End points and reachability
8.2 Blocks
8.2.1 Statement lists
8.3 The empty statement
8.4 Labeled statements
8.5 Declaration statements
8.5.1 Local variable declarations
8.5.2 Local constant declarations
8.6 Expression statements
8.7 Selection statements
8.7.1 The if statement
8.7.2 The switch statement
8.8 Iteration statements
8.8.1 The while statement
8.8.2 The do statement
8.8.3 The for statement
8.8.4 The foreach statement
8.9 Jump statements
8.9.1 The break statement
8.9.2 The continue statement
8.9.3 The goto statement
8.9.4 The return statement
8.9.5 The throw statement
8.10 The try statement
8.11 The checked and unchecked statements
8.12 The lock statement
8.13 The using statement
8.14 The yield statement
命名空间
**[第九章 命名空间](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html "C# Language Specification 5.0 (翻译)第九章 命名空间")**(2015年12月13日,完成度20%) [9.1 编译单元](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_1 "Compilation units") [9.2 命名空间声明](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_2 "Namespace declarations") [9.3 Extern 别名](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_3 "Extern aliases") [9.4 using 指令](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_4 "Using directives") [9.4.1 using 别名指令](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_5 "Using alias directives") [9.4.2 using 命名空间指令](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_6 "Using namespace directives") [9.5 命名空间成员](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_7 "Namespace members") [9.6 类型定义](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_8 "Type declarations") [9.7 命名空间别名限定符](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_9 "Namespace alias qualifiers") [9.7.1 别名唯一性](http://www.cnblogs.com/forerunner/p/csls5-9-Namespaces.html#nav_10 "Uniqueness of aliases")类 Classes
10.1 Class declarations
10.1.1 Class modifiers
10.1.1.1 Abstract classes
10.1.1.2 Sealed classes
10.1.1.3 Static classes
10.1.2 Partial modifier
10.1.3 Type parameters
10.1.4 Class base specification
10.1.4.1 Base classes
10.1.4.2 Interface implementations
10.1.5 Type parameter constraints
10.1.6 Class body
10.2 Partial types
10.2.1 Attributes
10.2.2 Modifiers
10.2.3 Type parameters and constraints
10.2.4 Base class
10.2.5 Base interfaces
10.2.6 Members
10.2.7 Partial methods
10.2.8 Name binding
10.3 Class members
10.3.1 The instance type
10.3.2 Members of constructed types
10.3.3 Inheritance
10.3.4 The new modifier
10.3.5 Access modifiers
10.3.6 Constituent types
10.3.7 Static and instance members
10.3.8 Nested types
10.3.8.1 Fully qualified name
10.3.8.2 Declared accessibility
10.3.8.3 Hiding
10.3.8.4 this access
10.3.8.5 Access to private and protected members of the containing type
10.3.8.6 Nested types in generic classes
10.3.9 Reserved member names
10.3.9.1 Member names reserved for properties
10.3.9.2 Member names reserved for events
10.3.9.3 Member names reserved for indexers
10.3.9.4 Member names reserved for destructors
10.4 Constants
10.5 Fields
10.5.1 Static and instance fields
10.5.2 Readonly fields
10.5.2.1 Using static readonly fields for constants
10.5.2.2 Versioning of constants and static readonly fields
10.5.3 Volatile fields
10.5.4 Field initialization
10.5.5 Variable initializers
10.5.5.1 Static field initialization
10.5.5.2 Instance field initialization
10.6 Methods
10.6.1 Method parameters
10.6.1.1 Value parameters
10.6.1.2 Reference parameters
10.6.1.3 Output parameters
10.6.1.4 Parameter arrays
10.6.2 Static and instance methods
10.6.3 Virtual methods
10.6.4 Override methods
10.6.5 Sealed methods
10.6.6 Abstract methods
10.6.7 External methods
10.6.8 Partial methods
10.6.9 Extension methods
10.6.10 Method body
10.6.11 Method overloading
10.7 Properties
10.7.1 Static and instance properties
10.7.2 Accessors
10.7.3 Automatically implemented properties
10.7.4 Accessibility
10.7.5 Virtual, sealed, override, and abstract accessors
10.8 Events
10.8.1 Field-like events
10.8.2 Event accessors
10.8.3 Static and instance events
10.8.4 Virtual, sealed, override, and abstract accessors
10.9 Indexers
10.9.1 Indexer overloading
10.10 Operators
10.10.1 Unary operators
10.10.2 Binary operators
10.10.3 Conversion operators
10.11 Instance constructors
10.11.1 Constructor initializers
10.11.2 Instance variable initializers
10.11.3 Constructor execution
10.11.4 Default constructors
10.11.5 Private constructors
10.11.6 Optional instance constructor parameters
10.12 Static constructors
10.13 Destructors
10.14 Iterators
10.14.1 Enumerator interfaces
10.14.2 Enumerable interfaces
10.14.3 Yield type
10.14.4 Enumerator objects
10.14.4.1 The MoveNext method
10.14.4.2 The Current property
10.14.4.3 The Dispose method
10.14.5 Enumerable objects
10.14.5.1 The GetEnumerator method
10.14.6 Implementation example
结构 Structs
11.1 Struct declarations
11.1.1 Struct modifiers
11.1.2 Partial modifier
11.1.3 Struct interfaces
11.1.4 Struct body
11.2 Struct members
11.3 Class and struct differences
11.3.1 Value semantics
11.3.2 Inheritance
11.3.3 Assignment
11.3.4 Default values
11.3.5 Boxing and unboxing
11.3.6 Meaning of this
11.3.7 Field initializers
11.3.8 Constructors
11.3.9 Destructors
11.3.10 Static constructors
11.4 Struct examples
11.4.1 Database integer type
11.4.2 Database boolean type
数组 Arrays
12.1 Array types
12.1.1 The System.Array type
12.1.2 Arrays and the generic IList interface
12.2 Array creation
12.3 Array element access
12.4 Array members
12.5 Array covariance
12.6 Array initializers
接口 Interfaces
13.1 Interface declarations
13.1.1 Interface modifiers
13.1.2 Partial modifier
13.1.3 Variant type parameter lists
13.1.3.1 Variance safety
13.1.3.2 Variance conversion
13.1.4 Base interfaces
13.1.5 Interface body
13.2 Interface members
13.2.1 Interface methods
13.2.2 Interface properties
13.2.3 Interface events
13.2.4 Interface indexers
13.2.5 Interface member access
13.3 Fully qualified interface member names
13.4 Interface implementations
13.4.1 Explicit interface member implementations
13.4.2 Uniqueness of implemented interfaces
13.4.3 Implementation of generic methods
13.4.4 Interface mapping
13.4.5 Interface implementation inheritance
13.4.6 Interface re-implementation
13.4.7 Abstract classes and interfaces
枚举 Enums
14.1 Enum declarations
14.2 Enum modifiers
14.3 Enum members
14.4 The System.Enum type
14.5 Enum values and operations
委托 Delegates
15.1 Delegate declarations
15.2 Delegate compatibility
15.3 Delegate instantiation
15.4 Delegate invocation
异常 Exceptions
16.1 Causes of exceptions
16.2 The System.Exception class
16.3 How exceptions are handled
16.4 Common Exception Classes
特性 Attributes
17.1 Attribute classes
17.1.1 Attribute usage
17.1.2 Positional and named parameters
17.1.3 Attribute parameter types
17.2 Attribute specification
17.3 Attribute instances
17.3.1 Compilation of an attribute
17.3.2 Run-time retrieval of an attribute instance
17.4 Reserved attributes
17.4.1 The AttributeUsage attribute
17.4.2 The Conditional attribute
17.4.2.1 Conditional methods
17.4.2.2 Conditional attribute classes
17.4.3 The Obsolete attribute
17.5 Attributes for Interoperation
17.5.1 Interoperation with COM and Win32 components
17.5.2 Interoperation with other .NET languages
17.5.2.1 The IndexerName attribute
编写不安全的代码
18.1 Unsafe contexts
18.2 Pointer types
18.3 Fixed and moveable variables
18.4 Pointer conversions
18.4.1 Pointer arrays
18.5 Pointers in expressions
18.5.1 Pointer indirection
18.5.2 Pointer member access
18.5.3 Pointer element access
18.5.4 The address-of operator
18.5.5 Pointer increment and decrement
18.5.6 Pointer arithmetic
18.5.7 Pointer comparison
18.5.8 The sizeof operator
18.6 The fixed statement
18.7 Fixed size buffers
18.7.1 Fixed size buffer declarations
18.7.2 Fixed size buffers in expressions
18.7.3 Definite assignment checking
18.8 Stack allocation
18.9 Dynamic memory allocation
附录1:注释
A.1 Introduction
A.2 Recommended tags
A.2.1 <c>
A.2.2 <code>
A.2.3 <example>
A.2.4 <exception>
A.2.5 <include>
A.2.6 <list>
A.2.7 <para>
A.2.8 <param>
A.2.9 <paramref>
A.2.10 <permission>
A.2.11 <remark>
A.2.12 <returns>
A.2.13 <see>
A.2.14 <seealso>
A.2.15 <summary>
A.2.16 <value>
A.2.17 <typeparam>
A.2.18 <typeparamref>
A.3 Processing the documentation file
A.3.1 ID string format
A.3.2 ID string examples
A.4 An example
A.4.1 C# source code
A.4.2 Resulting XML
附录2:语法
B.1 Lexical grammar
B.1.1 Line terminators
B.1.2 Comments
B.1.3 White space
B.1.4 Tokens
B.1.5 Unicode character escape sequences
B.1.6 Identifiers
B.1.7 Keywords
B.1.8 Literals
B.1.9 Operators and punctuators
B.1.10 Pre-processing directives
B.2 Syntactic grammar
B.2.1 Basic concepts
B.2.2 Types
B.2.3 Variables
B.2.4 Expressions
B.2.5 Statements
B.2.6 Namespaces
B.2.7 Classes
B.2.8 Structs
B.2.9 Arrays
B.2.10 Interfaces
B.2.11 Enums
B.2.12 Delegates
B.2.13 Attributes
B.3 Grammar extensions for unsafe code