First, most of the C # keywords are listed in the following table:
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
Context Keyword:
The context keyword is used to provide specific meanings in the code, but it is not a reserved word in C. Some context keywords (such as partial and where) have special meanings in two or more contexts.
Add
Alias
Ascending
Descending
Dynamic
From
Get
Global
Group
Into
Join
Let
Orderby
Partial (type)
Partial (method)
Remove
Select
Set
Value
Var
Where (generic type constraint)
Where (query clause)
Yield
The chart above is copied from: http://msdn.microsoft.com/en-us/library/x53a06bb (v = VS.100). aspx
As you can clearly see, msdn does not properly classify keywords. In this series, it is mainly based on C # And then grouping keywords to help beginners.
Keywords used to modify classes, methods, attributes, and fields:
Abstract
New
Override
Virtual
Private
Protected
Internal
Public
Const
Readonly
Sealed
Static
Volatile
Extern
Keyword that deals with object type and type conversions:
As
Is
Explicit
Implicit
Operator
Sizeof
Typeof
Some Type aliases, special types, and enumeration keywords:
Bool
Byte
Char
Decimal
Double
Float
Int
Long
Sbyte
Short
String
Uint
Ulong
Ushort
Enum
Class
Interface
Object
Struct
Keyword of the control program flow:
For
Foreach, in
While
Do
If
Else
Switch
Case
Default
Goto
Break
Continue
Return
Keyword for exception handling:
Try
Throw
Catch
Finally
Checked
Unchecked
Similar to C ++ function pointers and related topic keywords:
Delegate
Event
Keywords that affect GC collection:
Fixed
Keyword of the multi-thread critical area:
Lock
Keyword of declared scope:
Namespace
Keyword used to control the memory allocation of objects:
New
Stackalloc
Keyword that affects method parameter transfer:
Out
Params
Ref
Some text values and keywords that reference the current object instance:
Null
False
True
This
Value
Keywords related to unmanaged code:
Unsafe
Other keywords:
Base
Void
Var
Dynamic