
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
Keywords in C#
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
abstract | as | base | Bool | break | byte | case |
catch | 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 |
interface | internal | is | Lock | long | namespace | new |
null | object | operator | Out | out (generic modifier) | override | params |
private | protected | public | Readonly | ref | return | sbyte |
sealed | short | sizeof | stackalloc | static | string | struct |
switch | this | throw | True | try | typeof | uint |
ulong | unchecked | unsafe | Ushort | using | virtual | void |
volatile | while |
Contextual Keywords
add | alias | ascending | descending | dynamic | from | get |
global | group | into | join | let | orderby | partial (type) |
partial(method) | remove | select | set |
- Related Articles
- C++ Keywords
- Reserved keywords in C++?
- Important Keywords in C#
- Variables and Keywords in C
- What are reserved keywords in C#?
- What are contextual keywords in C#?
- char vs string keywords in C#
- How many keywords are there in C++?
- Tokens vs Identifiers vs Keywords in C++
- Try/catch/finally/throw keywords in C#
- What are signed and unsigned keywords in C++?
- Keywords in Java
- Keywords in Python
- Go Keywords
- What are the different types of keywords in C language?

Advertisements