关键字是对编译器具有特殊意义的预定义保留标识符。它们不能在程序中用作标识符,除非它们有一个 @ 前缀。例如,@if 是一个合法的标识符,而 if 不是合法的标识符,因为它是关键字。
| abstract | event | new | struct |
| as | null | switch | |
| base | extern | object | this |
| bool | false | operator | throw |
| break | finally | out | true |
| byte | fixed | override | try |
| case | float | params | typeof |
| catch | for | private | uint |
| char | foreach | protected | ulong |
| checked | goto | public | unchecked |
| class | if | readonly | unsafe |
| const | implicit | ref | ushort |
| continue | in | return | using |
| decimal | int | sbyte | virtual |
| default | interface | sealed | volatile |
| internal | short | void | |
| do | is | sizeof | while |
| double | lock | stackalloc |
|
| else | long | static |
|
| enum | namespace | string |
|
| get | partial | set |
| value | where | yield |
394

被折叠的 条评论
为什么被折叠?



