C# Keywords - c# - c# tutorial - c# net
What is C# Keywords ?
- A keyword is a reserved word. You cannot use it as a variable name, constant name etc.
- In C# keywords cannot be used as identifiers. However, if we want to use the keywords as identifiers, we may prefix the keyword with @ character.

A list of Reserved Keywords available in C# programming language is given below:
abstract | base | as | bool | break | catch | case |
---|---|---|---|---|---|---|
byte | char | checked | class | const | continue | decimal |
explicit | extern | false | finally | fixed | float | for |
foreach | goto | if | implicit | in | in (generic modifier) | int |
ulong | ushort | unchecked | using | unsafe | virtual | void |
null | object | operator | out | out (generic modifier) | override | params |
default | delegate | do | double | else | enum | event |
sealed | short | sizeof | stackalloc | static | string | struct |
switch | this | throw | true | try | typeof | uint |
abstract | base | as | bool | break | catch | case |
volatile | while |
- Some identifiers which have special meaning in context of code are called as Contextual Keywords.
c# - Contextual keywords :
- New with C# 2.0 standards
- As powerful as regular keywords
- Contextual keywords have special meaning only when used in a specific context; other times they can be used as identifiers
