您好,欢迎光临本网站![请登录][注册会员]  
文件名称: C#语言规范(3.0)中文-微软官方版
  所属分类: .Net
  开发工具:
  文件大小: 2mb
  下载次数: 0
  上传时间: 2011-03-16
  提 供 者: ton****
 详细说明: 目录 1. 简介 .......................................................................................................................................................................... 1 1.1 Hello world .......................................................................................................................................................... 1 1.2 程序结构 ............................................................................................................................................................ 2 1.3 类型和变量 . ....................................................................................................................................................... 3 1.4 表达式 ................................................................................................................................................................ 6 1.5 语句 .................................................................................................................................................................... 8 1.6 类和对象 .......................................................................................................................................................... 12 1.6.1 成员 ........................................................................................................................................................... 12 1.6.2 可访问性 ................................................................................................................................................... 13 1.6.3 类型形参 ................................................................................................................................................... 13 1.6.4 基类 ........................................................................................................................................................... 14 1.6.5 字段 ........................................................................................................................................................... 14 1.6.6 方法 ........................................................................................................................................................... 15 1.6.6.1 参数 .................................................................................................................................................... 15 1.6.6.2 方法体和局部变量 ............................................................................................................................ 16 1.6.6.3 静态方法和实例方法 ........................................................................................................................ 17 1.6.6.4 虚方法、重写方法和抽象方法........................................................................................................ 18 1.6.6.5 方法重载 ............................................................................................................................................ 20 1.6.7 其他函数成员 ........................................................................................................................................... 21 1.6.7.1 构造函数 ............................................................................................................................................ 22 1.6.7.2 属性 .................................................................................................................................................... 23 1.6.7.3 索引器 ................................................................................................................................................ 23 1.6.7.4 事件 .................................................................................................................................................... 23 1.6.7.5 运算符 ................................................................................................................................................ 24 1.6.7.6 析构函数 ............................................................................................................................................ 25 1.7 结构 .................................................................................................................................................................. 25 1.8 数组 .................................................................................................................................................................. 26 1.9 接口 .................................................................................................................................................................. 27 1.10 枚举 ................................................................................................................................................................ 28 1.11 委托 ................................................................................................................................................................ 30 1.12 属性 ................................................................................................................................................................ 31 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. C# 语言规范 iv 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 2. 词法结构 ................................................................................................................................................................ 33 2.1 程序 .................................................................................................................................................................. 33 2.2 文法 .................................................................................................................................................................. 33 2.2.1 文法表示法 ............................................................................................................................................... 33 2.2.2 词法文法 ................................................................................................................................................... 34 2.2.3 句法文法 ................................................................................................................................................... 34 2.3 词法分析 .......................................................................................................................................................... 34 2.3.1 行结束符 ................................................................................................................................................... 35 2.3.2 注释 ........................................................................................................................................................... 35 2.3.3 空白 ........................................................................................................................................................... 37 2.4 标记 .................................................................................................................................................................. 37 2.4.1 Unicode 字符转义序列............................................................................................................................. 37 2.4.2 标识符 ....................................................................................................................................................... 38 2.4.3 关键字 ....................................................................................................................................................... 40 2.4.4 文本 ........................................................................................................................................................... 40 2.4.4.1 布尔值 ................................................................................................................................................ 40 2.4.4.2 整数 .................................................................................................................................................... 41 2.4.4.3 实数 .................................................................................................................................................... 42 2.4.4.4 字符 .................................................................................................................................................... 42 2.4.4.5 字符串 ................................................................................................................................................ 43 2.4.4.6 null 文本 ............................................................................................................................................. 45 2.4.5 运算符和标点符号 .................................................................................................................................. 45 2.5 预处理指令 ...................................................................................................................................................... 45 2.5.1 条件编译符号 ........................................................................................................................................... 47 2.5.2 预处理表达式 ........................................................................................................................................... 47 2.5.3 声明指令 ................................................................................................................................................... 48 2.5.4 条件编译指令 ........................................................................................................................................... 49 2.5.5 诊断指令 ................................................................................................................................................... 51 2.5.6 区域指令 ................................................................................................................................................... 51 2.5.7 行指令 ....................................................................................................................................................... 52 2.5.8 Pragma 指令.............................................................................................................................................. 52 2.5.8.1 Pragma warning .................................................................................................................................. 53 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. 目录 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 v 3. 基本概念 ................................................................................................................................................................ 55 3.1 应用程序启动 .................................................................................................................................................. 55 3.2 应用程序终止 .................................................................................................................................................. 56 3.3 声明 .................................................................................................................................................................. 56 3.4 成员 .................................................................................................................................................................. 58 3.4.1 命名空间成员 ........................................................................................................................................... 58 3.4.2 结构成员 ................................................................................................................................................... 58 3.4.3 枚举成员 ................................................................................................................................................... 59 3.4.4 类成员 ....................................................................................................................................................... 59 3.4.5 接口成员 ................................................................................................................................................... 59 3.4.6 数组成员 ................................................................................................................................................... 59 3.4.7 委托成员 ................................................................................................................................................... 59 3.5 成员访问 .......................................................................................................................................................... 60 3.5.1 已声明可访问性....................................................................................................................................... 60 3.5.2 可访问域 ................................................................................................................................................... 61 3.5.3 实例成员的受保护访问 ........................................................................................................................... 63 3.5.4 可访问性约束 ........................................................................................................................................... 64 3.6 签名和重载 ...................................................................................................................................................... 65 3.7 范围 .................................................................................................................................................................. 66 3.7.1 名称隐藏 ................................................................................................................................................... 68 3.7.1.1 通过嵌套隐藏 .................................................................................................................................... 68 3.7.1.2 通过继承隐藏 .................................................................................................................................... 69 3.8 命名空间和类型名称 ..................................................................................................................................... 70 3.8.1 完全限定名 ............................................................................................................................................... 72 3.9 自动内存管理 .................................................................................................................................................. 73 3.10 执行顺序 ........................................................................................................................................................ 75 4. 类型 ........................................................................................................................................................................ 77 4.1 值类型 .............................................................................................................................................................. 77 4.1.1 System.ValueType 类型 ........................................................................................................................... 78 4.1.2 默认构造函数 ........................................................................................................................................... 78 4.1.3 结构类型 ................................................................................................................................................... 79 4.1.4 简单类型 ................................................................................................................................................... 79 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. C# 语言规范 vi 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 4.1.5 整型 ........................................................................................................................................................... 80 4.1.6 浮点型 ....................................................................................................................................................... 81 4.1.7 decimal 类型 ............................................................................................................................................. 82 4.1.8 bool 类型 ................................................................................................................................................... 82 4.1.9 枚举类型 ................................................................................................................................................... 83 4.1.10 可以为 null 的类型 ............................................................................................................................... 83 4.2 引用类型 .......................................................................................................................................................... 83 4.2.1 类类型 ....................................................................................................................................................... 84 4.2.2 对象类型 ................................................................................................................................................... 85 4.2.3 string 类型 ................................................................................................................................................. 85 4.2.4 接口类型 ................................................................................................................................................... 85 4.2.5 数组类型 ................................................................................................................................................... 85 4.2.6 委托类型 ................................................................................................................................................... 85 4.3 装箱和拆箱 ...................................................................................................................................................... 85 4.3.1 装箱转换 ................................................................................................................................................... 85 4.3.2 拆箱转换 ................................................................................................................................................... 87 4.4 构造类型 .......................................................................................................................................................... 87 4.4.1 类型实参 ................................................................................................................................................... 88 4.4.2 开放和封闭类型....................................................................................................................................... 88 4.4.3 绑定和未绑定类型 .................................................................................................................................. 89 4.4.4 满足约束 ................................................................................................................................................... 89 4.5 类型形参 .......................................................................................................................................................... 90 4.6 表达式目录树类型 ......................................................................................................................................... 91 5. 变量 ........................................................................................................................................................................ 93 5.1 变量类别 .......................................................................................................................................................... 93 5.1.1 静态变量 ................................................................................................................................................... 93 5.1.2 实例变量 ................................................................................................................................................... 93 5.1.2.1 类中的实例变量................................................................................................................................ 93 5.1.2.2 结构中的实例变量 ............................................................................................................................ 94 5.1.3 数组元素 ................................................................................................................................................... 94 5.1.4 值参数 ....................................................................................................................................................... 94 5.1.5 引用形参 ................................................................................................................................................... 94 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. 目录 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 vii 5.1.6 输出形参 ................................................................................................................................................... 94 5.1.7 局部变量 ................................................................................................................................................... 95 5.2 默认值 .............................................................................................................................................................. 95 5.3 明确赋值 .......................................................................................................................................................... 96 5.3.1 初始已赋值变量....................................................................................................................................... 96 5.3.2 初始未赋值变量....................................................................................................................................... 97 5.3.3 确定明确赋值的细则 ............................................................................................................................... 97 5.3.3.1 一般语句规则 .................................................................................................................................... 97 5.3.3.2 块语句、checked 和 unchecked 语句 ........................................................................................... 98 5.3.3.3 表达式语句 ........................................................................................................................................ 98 5.3.3.4 声明语句 ............................................................................................................................................ 98 5.3.3.5 if 语句 ................................................................................................................................................. 98 5.3.3.6 switch 语句 ........................................................................................................................................ 99 5.3.3.7 while 语句 .......................................................................................................................................... 99 5.3.3.8 do 语句 ............................................................................................................................................... 99 5.3.3.9 for 语句............................................................................................................................................... 99 5.3.3.10 break、continue 和 goto 语句 ..................................................................................................... 100 5.3.3.11 throw 语句...................................................................................................................................... 100 5.3.3.12 return 语句 ..................................................................................................................................... 100 5.3.3.13 try-catch 语句 ................................................................................................................................ 100 5.3.3.14 try-finally 语句 ............................................................................................................................... 100 5.3.3.15 try-catch-finally 语句 ..................................................................................................................... 101 5.3.3.16 foreach 语句 ................................................................................................................................... 102 5.3.3.17 using 语句 ...................................................................................................................................... 102 5.3.3.18 lock 语句 ........................................................................................................................................ 102 5.3.3.19 yield 语句 ....................................................................................................................................... 103 5.3.3.20 简单表达式的一般规则 ................................................................................................................ 103 5.3.3.21 带有嵌入表达式的表达式的一般规则 ....................................................................................... 103 5.3.3.22 调用表达式和对象创建表达式 ................................................................................................... 103 5.3.3.23 简单赋值表达式 ............................................................................................................................ 104 5.3.3.24 && 表达式 ..................................................................................................................................... 104 5.3.3.25 || 表达式 ......................................................................................................................................... 105 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. C# 语言规范 viii 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 5.3.3.26 ! 表达式 .......................................................................................................................................... 105 5.3.3.27 ?? 表达式 ....................................................................................................................................... 106 5.3.3.28 ?: 表达式 ........................................................................................................................................ 106 5.3.3.29 匿名函数 ........................................................................................................................................ 107 5.4 变量引用 ........................................................................................................................................................ 107 5.5 变量引用的原子性 ....................................................................................................................................... 107 6. 转换 ...................................................................................................................................................................... 109 6.1 隐式转换 ........................................................................................................................................................ 109 6.1.1 标识转换 ................................................................................................................................................. 109 6.1.2 隐式数值转换 ......................................................................................................................................... 110 6.1.3 隐式枚举转换 ......................................................................................................................................... 110 6.1.4 可以为 null 的隐式转换 ....................................................................................................................... 110 6.1.5 null 文本转换 ......................................................................................................................................... 110 6.1.6 隐式引用转换 ......................................................................................................................................... 111 6.1.7 装箱转换 ................................................................................................................................................. 111 6.1.8 隐式常量表达式转换 ............................................................................................................................. 112 6.1.9 涉及类型形参的隐式转换 ..................................................................................................................... 112 6.1.10 用户定义的隐式转换 ........................................................................................................................... 112 6.1.11 匿名函数转换和方法组转换 ............................................................................................................... 112 6.2 显式转换 ........................................................................................................................................................ 112 6.2.1 显式数值转换 ......................................................................................................................................... 113 6.2.2 显式枚举转换 ......................................................................................................................................... 114 6.2.3 可以为 null 的显式转换 ....................................................................................................................... 115 6.2.4 显式引用转换 ......................................................................................................................................... 115 6.2.5 拆箱转换 ................................................................................................................................................. 116 6.2.6 涉及类型形参的显式转换 ..................................................................................................................... 116 6.2.7 用户定义的显式转换 ............................................................................................................................. 117 6.3 标准转换 ........................................................................................................................................................ 117 6.3.1 标准隐式转换 ......................................................................................................................................... 117 6.3.2 标准显式转换 ......................................................................................................................................... 117 6.4 用户定义的转换 ........................................................................................................................................... 118 6.4.1 允许的用户定义转换 ............................................................................................................................. 118 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. 目录 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 ix 6.4.2 提升转换运算符..................................................................................................................................... 118 6.4.3 用户定义转换的计算 ............................................................................................................................. 118 6.4.4 用户定义的隐式转换 ............................................................................................................................. 119 6.4.5 用户定义的显式转换 ............................................................................................................................. 120 6.5 匿名函数转换 ................................................................................................................................................ 121 6.5.1 匿名函数转换为委托类型的计算 ........................................................................................................ 122 6.5.2 匿名函数转换为表达式目录树类型的计算 ........................................................................................ 122 6.5.3 实现示例 ................................................................................................................................................. 122 6.6 方法组转换 .................................................................................................................................................... 125 7. 表达式 .................................................................................................................................................................. 127 7.1 表达式的分类 ................................................................................................................................................ 127 7.1.1 表达式的值 ............................................................................................................................................. 128 7.2 运算符 ............................................................................................................................................................ 128 7.2.1 运算符的优先级和顺序关联性............................................................................................................. 128 7.2.2 运算符重载 ............................................................................................................................................. 129 7.2.3 一元运算符重载决策 ............................................................................................................................. 131 7.2.4 二元运算符重载决策 ............................................................................................................................. 131 7.2.5 候选用户定义运算符 ............................................................................................................................. 131 7.2.6 数值提升 ................................................................................................................................................. 131 7.2.6.1 一元数值提升 .................................................................................................................................. 132 7.2.6.2 二元数值提升 .................................................................................................................................. 132 7.2.7 提升运算符 ............................................................................................................................................. 133 7.3 成员查找 ........................................................................................................................................................ 134 7.3.1 基类型 ..................................................................................................................................................... 135 7.4 函数成员 ........................................................................................................................................................ 135 7.4.1 实参列表 ................................................................................................................................................. 137 7.4.2 类型推断 ................................................................................................................................................. 140 7.4.2.1 第一阶段 .......................................................................................................................................... 140 7.4.2.2 第二阶段 .......................................................................................................................................... 141 7.4.2.3 输入类型 .......................................................................................................................................... 141 7.4.2.4 输出类型 .......................................................................................................................................... 141 7.4.2.5 依赖 .................................................................................................................................................. 141 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. C# 语言规范 x 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 7.4.2.6 输出类型推断 .................................................................................................................................. 141 7.4.2.7 参数类型显式推断 .......................................................................................................................... 141 7.4.2.8 精确推断 .......................................................................................................................................... 142 7.4.2.9 下限推断 .......................................................................................................................................... 142 7.4.2.10 固定 ................................................................................................................................................ 142 7.4.2.11 推断返回类型 ................................................................................................................................ 142 7.4.2.12 方法组转换的类型推断 ................................................................................................................ 144 7.4.2.13 查找一组表达式的最通用类型 ................................................................................................... 144 7.4.3 重载决策 ................................................................................................................................................. 144 7.4.3.1 适用函数成员 .................................................................................................................................. 145 7.4.3.2 更好的函数成员............................................................................................................................... 145 7.4.3.3 表达式的更佳转换 .......................................................................................................................... 146 7.4.3.4 类型的更佳转换............................................................................................................................... 146 7.4.3.5 泛型类中的重载............................................................................................................................... 147 7.4.4 函数成员调用 ......................................................................................................................................... 147 7.4.4.1 已装箱实例上的调用 ...................................................................................................................... 148 7.5 基本表达式 .................................................................................................................................................... 149 7.5.1 文本 ......................................................................................................................................................... 149 7.5.2 简单名称 ................................................................................................................................................. 149 7.5.2.1 块中的固定含义............................................................................................................................... 151 7.5.3 带括号的表达式..................................................................................................................................... 152 7.5.4 成员访问 ................................................................................................................................................. 152 7.5.4.1 相同的简单名称和类型名称 .......................................................................................................... 154 7.5.4.2 语法多义性 ...................................................................................................................................... 154 7.5.5 调用表达式 ............................................................................................................................................. 155 7.5.5.1 方法调用 .......................................................................................................................................... 155 7.5.5.2 扩展方法调用 .................................................................................................................................. 157 7.5.5.3 委托调用 .......................................................................................................................................... 159 7.5.6 元素访问 ................................................................................................................................................. 159 7.5.6.1 数组访问 .......................................................................................................................................... 159 7.5.6.2 索引器访问 ...................................................................................................................................... 160 7.5.7 this 访问 .................................................................................................................................................. 160 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. 目录 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 xi 7.5.8 base 访问 ................................................................................................................................................. 161 7.5.9 后缀增量和后缀减量运算符 ................................................................................................................. 162 7.5.10 new 运算符 ........................................................................................................................................... 162 7.5.10.1 对象创建表达式 ............................................................................................................................ 163 7.5.10.2 对象初始值设定项 ........................................................................................................................ 164 7.5.10.3 集合初始值设定项 ........................................................................................................................ 166 7.5.10.4 数组创建表达式 ............................................................................................................................ 167 7.5.10.5 委托创建表达式 ............................................................................................................................ 169 7.5.10.6 匿名对象创建表达式 .................................................................................................................... 170 7.5.11 typeof 运算符 ....................................................................................................................................... 172 7.5.12 checked 和 unchecked 运算符 ........................................................................................................... 173 7.5.13 默认值表达式 ....................................................................................................................................... 175 7.5.14 匿名方法表达式 .................................................................................................................................. 176 7.6 一元运算符 .................................................................................................................................................... 176 7.6.1 一元加运算符 ......................................................................................................................................... 176 7.6.2 一元减运算符 ......................................................................................................................................... 176 7.6.3 逻辑否定运算符..................................................................................................................................... 177 7.6.4 按位求补运算符..................................................................................................................................... 177 7.6.5 前缀增量和减量运算符 ......................................................................................................................... 178 7.6.6 强制转换表达式..................................................................................................................................... 178 7.7 算术运算符 .................................................................................................................................................... 179 7.7.1 乘法运算符 ............................................................................................................................................. 179 7.7.2 除法运算符 ............................................................................................................................................. 180 7.7.3 余数运算符 ............................................................................................................................................. 181 7.7.4 加法运算符 ............................................................................................................................................. 182 7.7.5 减法运算符 ............................................................................................................................................. 184 7.8 移位运算符 .................................................................................................................................................... 186 7.9 关系和类型测试运算符 ............................................................................................................................... 187 7.9.1 整数比较运算符..................................................................................................................................... 187 7.9.2 浮点比较运算符..................................................................................................................................... 188 7.9.3 小数比较运算符..................................................................................................................................... 189 7.9.4 布尔相等运算符..................................................................................................................................... 189 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. C# 语言规范 xii 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 7.9.5 枚举比较运算符..................................................................................................................................... 189 7.9.6 引用类型相等运算符 ............................................................................................................................. 189 7.9.7 字符串相等运算符 ................................................................................................................................ 191 7.9.8 委托相等运算符..................................................................................................................................... 191 7.9.9 相等运算符和 null ................................................................................................................................ 192 7.9.10 is 运算符 ............................................................................................................................................... 192 7.9.11 as 运算符............................................................................................................................................... 193 7.10 逻辑运算符 .................................................................................................................................................. 193 7.10.1 整数逻辑运算符 .................................................................................................................................. 194 7.10.2 枚举逻辑运算符 .................................................................................................................................. 194 7.10.3 布尔逻辑运算符 .................................................................................................................................. 194 7.10.4 可以为 null 的布尔逻辑运算符 ........................................................................................................ 194 7.11 条件逻辑运算符 ......................................................................................................................................... 195 7.11.1 布尔条件逻辑运算符 ........................................................................................................................... 196 7.11.2 用户定义的条件逻辑运算符 ............................................................................................................... 196 7.12 空合并运算符.............................................................................................................................................. 196 7.13 条件运算符 .................................................................................................................................................. 197 7.14 匿名函数表达式 ......................................................................................................................................... 198 7.14.1 匿名函数签名 ....................................................................................................................................... 199 7.14.2 匿名函数体 ........................................................................................................................................... 200 7.14.3 重载决策 ............................................................................................................................................... 200 7.14.4 外层变量 ............................................................................................................................................... 201 7.14.4.1 捕获的外层变量 ............................................................................................................................ 201 7.14.4.2 局部变量实例化 ............................................................................................................................ 202 7.14.5 匿名函数表达式的计算 ....................................................................................................................... 204 7.15 查询表达式 .................................................................................................................................................. 204 7.15.1 查询表达式中的多义性 ....................................................................................................................... 205 7.15.2 查询表达式转换 .................................................................................................................................. 206 7.15.2.1 带有延续部分的 select 和 GroupBy 子句 ............................................................................... 206 7.15.2.2 显式范围变量类型 ........................................................................................................................ 206 7.15.2.3 简并查询表达式 ............................................................................................................................ 207 7.15.2.4 from、let、where、join 和 orderby 子句.................................................................................. 208 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. 目录 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 xiii 7.15.2.5 select 子句 ...................................................................................................................................... 211 7.15.2.6 GroupBy 子句 ................................................................................................................................ 211 7.15.2.7 透明标识符 .................................................................................................................................... 212 7.15.3 查询表达式模式 .................................................................................................................................. 213 7.16 赋值运算符 .................................................................................................................................................. 214 7.16.1 简单赋值 ............................................................................................................................................... 215 7.16.2 复合赋值 ............................................................................................................................................... 217 7.16.3 事件赋值 ............................................................................................................................................... 217 7.17 表达式 .......................................................................................................................................................... 218 7.18 常量表达式 .................................................................................................................................................. 218 7.19 布尔表达式 .................................................................................................................................................. 219 8. 语句 ...................................................................................................................................................................... 221 8.1 结束点和可到达性 ....................................................................................................................................... 221 8.2 块 .................................................................................................................................................................... 223 8.2.1 语句列表 ................................................................................................................................................. 223 8.3 空语句 ............................................................................................................................................................ 224 8.4 标记语句 ........................................................................................................................................................ 224 8.5 声明语句 ........................................................................................................................................................ 225 8.5.1 局部变量声明 ......................................................................................................................................... 225 8.5.2 局部常量声明 ......................................................................................................................................... 226 8.6 表达式语句 .................................................................................................................................................... 227 8.7 选择语句 ........................................................................................................................................................ 227 8.7.1 if 语句 ...................................................................................................................................................... 227 8.7.2 switch 语句 ............................................................................................................................................. 228 8.8 迭代语句 ........................................................................................................................................................ 231 8.8.1 while 语句 ............................................................................................................................................... 232 8.8.2 do 语句 .................................................................................................................................................... 232 8.8.3 for 语句 ................................................................................................................................................... 233 8.8.4 foreach 语句 ............................................................................................................................................ 234 8.9 跳转语句 ........................................................................................................................................................ 236 8.9.1 break 语句 ............................................................................................................................................... 237 8.9.2 continue 语句 .......................................................................................................................................... 238 Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. C# 语言规范 xiv 版权所有 Ó Microsoft Corporation 1999-2008。保留所有权利。 8.9.3 goto 语句 ................................................................................................................................................. 238 8.9.4 return 语句 .............................................................................................................................................. 239 8.9.5 throw 语句............................................................................................................................................... 240 8.10 try 语句......................................................................................................................................................... 241 8.11 checked 语句和 unchecked 语句 .............................................................................................................. 243 8.12 lock 语句 ...................................................................................................................................................... 243 8.13 using 语句 .................................................................................................................................................... 244 8.14 yield 语句 ..................................................................................................................................................... 246 9. 命名空间 .............................................................................................................................................................. 249 9.1 编译单元 ........................................................................................................................................................ 249 9.2 命名空间声明 ................................................................................................................................................ 249 9.3 Extern 别名 .................................................................................................................................................... 250 9.4 using 指令 ...................................................................................................................................................... 251 9.4.1 using 别名指令 ....................................................................................................................................... 252 9.4.2 Using 命名空间指令 ............................................................................................................................... 254 9.5 命名空间成员 ................................................................................................................................................ 256 9.6 类型声明 ........................................................................................................................................................ 256 9.7 命名空间别名限定符 ................................................................................................................................... 257 9.7.1 别名的唯一性 ......................................................................................................................................... 258 10. 类 ........................................................................................................................................................................ 259 10.1 类声明 .......................................................................................................................................................... 259 10.1.1 类修饰符 ............................................................................................................................................... 259 10.1.1.1 抽象类 ............................................................................................................................................ 260 10.1.1.2 密封类 ............................................................................................................................................ 260 10.1.1.3 静态类 ............................................................................................................................................ 260 10.1.2 分部修饰符 ........................................................................................................................................... 261 10.1.3 类型形参 ............................................................................................................................................... 261 10.1.4 类基本规范 ........................................................................................................................................... 262 10.1.4.1 基类 .........................................................................
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: C#
 输入关键字,在本站1000多万海量源码库中尽情搜索: