C# keywords

There are some reserved keywords in C# which can not be used as names for variables ,class and methods so we can say these Keywords are predefined, reserved identifiers that have special meanings to the compiler. They cannot be used as identifiers. But we can use these keywords as identifier with prefix @ . suppose @abstract can be used but only abstract cannot be used because this is a keyword.

Following is the list of reserved words or keywords in C#:

abstractasbasebool
breakbytecasecatch
charcheckedclassconst
continuedecimaldefaultdelegate
dodoubleelseenum
eventexplicitexternfalse
finallyfixedfloatfor
foreachgotoifimplicit
inin (generic modifier)intinterface
internalislocklong
namespacenewnullobject
operatoroutout (generic modifier)override
paramsprivateprotectedpublic
readonlyrefreturnsbyte
sealedshortsizeofstackalloc
staticstringstructswitch
thisthrowtruetry
typeofuintulongunchecked
unsafeushortusingvirtual
voidvolatilewhile 

Note:

C# defines a set of words that have unique meaning when they are used in certain situation, these are called contextual keywords. These are as follows

Get

Set

Yield

Where

partial