C Sharp Keywords

C# Keywords

A keyword is a reserved word which cannot be used as a variable name, constant name, identifiers, etc. The keyword in C# needs to be prefixed with @ character, to use a keyword as an identifier. Listed below are the reserved Keywords available in C# programming language:

abstractbaseasboolbreakbyte
catchcasecharcheckedclassconst
continuedecimaldefaultdelegatedodouble
elseenumeventexplicitexternFALSE
finallyfixedfloatforforeachgoto
ifimplicitinin (generic modifier)intnull
objectoperatoroutout (generic modifier)overrideparams
privateprotectedpublicreturnreadonlyref
sbytesealedshortsizeofstackallocstatic
stringstructswitchthisthrowTRUE
trytypeofuintulongushortunchecked
usingunsafevirtualvoidvolatilewhile

Contextual Keywords:

There are also some identifiers with a special meaning in the context of code. They are known as Contextual Keywords. Listed below are the Contextual Keywords available in the C# programming language:

addaliasascendingdescendingdynamicfrom
getglobalgroupintojoinlet
orderbypartial (type)partial(method)removeselectset

 

Content Protection by DMCA.com
Please Share