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:
abstract | base | as | bool | break | byte |
catch | case | char | checked | class | const |
continue | decimal | default | delegate | do | double |
else | enum | event | explicit | extern | FALSE |
finally | fixed | float | for | foreach | goto |
if | implicit | in | in (generic modifier) | int | null |
object | operator | out | out (generic modifier) | override | params |
private | protected | public | return | readonly | ref |
sbyte | sealed | short | sizeof | stackalloc | static |
string | struct | switch | this | throw | TRUE |
try | typeof | uint | ulong | ushort | unchecked |
using | unsafe | virtual | void | volatile | while |
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:
add | alias | ascending | descending | dynamic | from |
get | global | group | into | join | let |
orderby | partial (type) | partial(method) | remove | select | set |