关键字是对编译器具有特殊意义的预定义保留标识符。它们不能在程序中用作标识符,除非它们有一个 @ 前缀。例如,@if 是一个合法的标识符,而 if 不是合法的标识符,因为它是关键字。
abstract
event
new
struct
as
explicit
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
delegate
internal
short
void
do
is
sizeof
while
double
lock
stackalloc
else
long
static
enum
namespace
string
get
partial
set
value
where
yield
posted on 2007-08-12 22:03 JEEF WANG 阅读(172) 评论(0) 编辑 收藏 举报