Keywords in C#

CsharpProgrammingServer Side Programming

Keywords are reserved words predefined to the C# compiler. These keywords cannot be used as identifiers. However, if you want to use these keywords as identifiers, you may prefix the keyword with the @ character.

The following are the two types of keywords in C#.

Reserved Keywords

abstractasbaseBoolbreakbytecase
catchcharcheckedClassconstcontinuedecimal
defaultdelegatedoDoubleelseenumevent
explicitexternfalseFinallyfixedfloatfor
foreachgotoifImplicitinin (generic modifier)int
interfaceinternalisLocklongnamespacenew
nullobjectoperatorOutout (generic modifier)overrideparams
privateprotectedpublicReadonlyrefreturnsbyte
sealedshortsizeofstackallocstaticstringstruct
switchthisthrowTruetrytypeofuint
ulonguncheckedunsafeUshortusingvirtualvoid
volatilewhile




Contextual Keywords

addaliasascendingdescendingdynamicfromget
globalgroupintojoinletorderbypartial (type)
partial(method)removeselectset


raja
Updated on 22-Jun-2020 08:58:35

Advertisements