C#保留关键字及上下文关键字

C#保留关键字

C#中的保留关键字,不可用于作为程序中的标识符使用,C#中的保留关键字如下表:

abstractasbaseboolbreak
bytecasecharcatchchecked
constclasscontinuedecimaldefault
delegatedodoubleelseenum
eventexplicitexternfalsefinally
fixedfloatforforeachgoto
ifimplicitinintinterface
internalislocklongnamespace
newnullobjectoperatorout
overrideparamsprivateprotectedpublic
readonlyrefreturnsbytesealed
shortsizeofstackallocstaticstring
structswitchthisthrowtrue
trytypeofuintulongunchecked
unsafeushortusingvirtualvoid
volatilewhile---

C#上下文关键字

上下文关键字用于提供代码中的特定含义,单不是C#中的保留字:

addasyncawaitdynamicget
globalpartialremovesetvalue
varwhereyield--

免责声明:内容仅供参考,不保证正确性。


全栈后端 / C#教程 :




Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.