Skip to content

Instantly share code, notes, and snippets.

@MiYanni
Last active July 1, 2022 23:05
Show Gist options
  • Save MiYanni/5835df9c542c88cff6508dfb6b21f994 to your computer and use it in GitHub Desktop.
Save MiYanni/5835df9c542c88cff6508dfb6b21f994 to your computer and use it in GitHub Desktop.
CSharpKeywordsByCategory.md

Assignment Types (v = value, r = reference, ? = unknown)

  • v | bool
  • v | byte
  • v | char
  • v | decimal
  • v | double
  • ? | dynamic
  • v | enum
  • v | float
  • v | int
  • v | long
  • v | nint
  • v | nuint
  • r | object
  • v | sbyte
  • v | short
  • r | string
  • v | unit
  • v | ulong
  • v | ushort
  • ? | var

Literals & Aliases

  • base
  • default
  • false
  • global
  • notnull [type constraint]
  • null
  • this
  • true
  • value
  • void

Definition Designators

  • alias
  • class
  • delegate
  • event
  • interface
  • operator
  • record
  • struct

Modifiers (a = access, d = declaration, p = parameter)

  • d | abstract
  • p | args
  • d | async
  • d | const
  • d | explicit
  • a | extern
  • d | implicit
  • a | internal
  • d | managed
  • p | out
  • d | override
  • p | params
  • d | partial
  • a | private
  • a | protected
  • a | public
  • d | readonly
  • p | ref
  • d | sealed
  • d | static
  • d | unmanaged
  • d | unsafe
  • d | virtual
  • d | volatile

Statement & Grouping

  • break
  • case
  • catch
  • checked
  • continue
  • do
  • else
  • finally
  • fixed
  • for
  • foreach
  • goto
  • if
  • lock
  • namespace
  • return
  • switch
  • throw
  • try
  • unchecked
  • using [directive & statement]
  • while
  • yield

Accessors

  • add
  • get
  • init
  • remove
  • set

Operators & Activators

  • await
  • nameof
  • new [instance creation, member declaration modifier, generic type constraint]
  • sizeof
  • stackalloc
  • typeof

Filters, Logic, & Conversion

  • and
  • as
  • in [generic type parameter, parameter modifier, foreach, from & join clauses]
  • is
  • not
  • or
  • when
  • where [generic type constraint, query clause]
  • with

Query Expressions

  • ascending
  • by
  • descending
  • equals
  • from
  • group
  • into
  • join
  • let
  • on
  • orderby
  • select

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment