Keywords are character tokens that define the syntax rules of the C# language.
A keyword is a set of built-in terms native to C#. These words carry special functional meanings, so you cannot reuse them for other coding purposes such as variable names or function names—doing so will create ambiguous logic. Take the word int as an example: it stands for integer data types in C#. If you attempt to declare a variable named int like bool int = 12;, the compiler will fail to parse your code, simply because int is reserved for dedicated language functionality.
There are two core rules governing keywords
Keywords cannot be directly used as variable names or other identifiers, with the sole exception of prefixing the keyword with the @ symbol. All standard C# keywords are written entirely in lowercase; by contrast, built-in .NET type names follow PascalCase capitalization.
| abstract | const | extern | int | override | sizeof | typeof | |
| as | continue | false | interface | params | stackalloc | uint | |
| base | decimal | finally | internal | private | static | ulong | |
| bool | default | fixed | is | protected | string | unchecked | |
| break | delegate | float | lock | public | struct | unsafe | |
| byte | do | for | long | readonly | switch | ushort | |
| case | double | foreach | namespace | ref | this | using | |
| catch | else | goto | new | return | throw | virtual | |
| char | enum | if | null | sbyte | true | void | |
| checked | event | implicit | object | sealed | try | volatile | |
| class | explicit | in | operator | when | while |
Globally reserved terms, never usable as raw identifiers in any scenario; the @ prefix is mandatory.
int @int; // Valid syntax
int int; // Triggers compilation errorCode language: JavaScript (javascript)
Contextual Keywords
Contextual Keywords
Contextual keywords only function as reserved words within specific syntax blocks. Unlike standard keywords, they can be freely used as identifiers elsewhere in your source code.
| add | ascending | async | await | by | descending | dynamic |
| equals | from | get | global | group | in | into |
| join | let | on | orderby | partial | remove | select |
| set | value | var | where | yield |
Only take keyword meaning in dedicated syntax structures; you may name variables directly with them in other places
int var; // Permitted, var is not treated as a keyword outside type inference logic
var num = 10; // var acts as a keyword here for implicit type deductionCode language: JavaScript (javascript)

All highlighted terms from the prior example fall under the category of keywords.
Keywords