- Foreword
- Introduction
- §1 Scope
- §2 Normative references
- §3 Terms and definitions
- §4 General description
- §5 Conformance
- §6 Lexical structure
- §7 Basic concepts
- §8 Types
- §9 Variables
- §9.1 General
- §9.2 Variable categories
- §9.3 Default values
- §9.4 Definite assignment
- §9.4.1 General
- §9.4.2 Initially assigned variables
- §9.4.3 Initially unassigned variables
- §9.4.4 Precise rules for determining definite assignment
- §9.4.4.1 General
- §9.4.4.2 General rules for statements
- §9.4.4.3 Block statements, checked, and unchecked statements
- §9.4.4.4 Expression statements
- §9.4.4.5 Declaration statements
- §9.4.4.6 If statements
- §9.4.4.7 Switch statements
- §9.4.4.8 While statements
- §9.4.4.9 Do statements
- §9.4.4.10 For statements
- §9.4.4.11 Break, continue, and goto statements
- §9.4.4.12 Throw statements
- §9.4.4.13 Return statements
- §9.4.4.14 Try-catch statements
- §9.4.4.15 Try-finally statements
- §9.4.4.16 Try-catch-finally statements
- §9.4.4.17 Foreach statements
- §9.4.4.18 Using statements
- §9.4.4.19 Lock statements
- §9.4.4.20 Yield statements
- §9.4.4.21 General rules for constant expressions
- §9.4.4.22 General rules for simple expressions
- §9.4.4.23 General rules for expressions with embedded expressions
- §9.4.4.24 Invocation expressions and object creation expressions
- §9.4.4.25 Simple assignment expressions
- §9.4.4.26 && expressions
- §9.4.4.27 || expressions
- §9.4.4.28 ! expressions
- §9.4.4.29 ?? expressions
- §9.4.4.30 ?: expressions
- §9.4.4.31 Anonymous functions
- §9.5 Variable references
- §9.6 Atomicity of variable references
- §10 Conversions
- §10.1 General
- §10.2 Implicit conversions
- §10.2.1 General
- §10.2.2 Identity conversion
- §10.2.3 Implicit numeric conversions
- §10.2.4 Implicit enumeration conversions
- §10.2.5 Implicit interpolated string conversions
- §10.2.6 Implicit nullable conversions
- §10.2.7 Null literal conversions
- §10.2.8 Implicit reference conversions
- §10.2.9 Boxing conversions
- §10.2.10 Implicit dynamic conversions
- §10.2.11 Implicit constant expression conversions
- §10.2.12 Implicit conversions involving type parameters
- §10.2.13 User-defined implicit conversions
- §10.2.14 Anonymous function conversions and method group conversions
- §10.3 Explicit conversions
- §10.3.1 General
- §10.3.2 Explicit numeric conversions
- §10.3.3 Explicit enumeration conversions
- §10.3.4 Explicit nullable conversions
- §10.3.5 Explicit reference conversions
- §10.3.6 Unboxing conversions
- §10.3.7 Explicit dynamic conversions
- §10.3.8 Explicit conversions involving type parameters
- §10.3.9 User-defined explicit conversions
- §10.4 Standard conversions
- §10.5 User-defined conversions
- §10.6 Conversions involving nullable types
- §10.7 Anonymous function conversions
- §10.8 Method group conversions
- §11 Expressions
- §11.1 General
- §11.2 Expression classifications
- §11.3 Static and Dynamic Binding
- §11.4 Operators
- §11.5 Member lookup
- §11.6 Function members
- §11.6.1 General
- §11.6.2 Argument lists
- §11.6.3 Type inference
- §11.6.3.1 General
- §11.6.3.2 The first phase
- §11.6.3.3 The second phase
- §11.6.3.4 Input types
- §11.6.3.5 Output types
- §11.6.3.6 Dependence
- §11.6.3.7 Output type inferences
- §11.6.3.8 Explicit parameter type inferences
- §11.6.3.9 Exact inferences
- §11.6.3.10 Lower-bound inferences
- §11.6.3.11 Upper-bound inferences
- §11.6.3.12 Fixing
- §11.6.3.13 Inferred return type
- §11.6.3.14 Type inference for conversion of method groups
- §11.6.3.15 Finding the best common type of a set of expressions
- §11.6.4 Overload resolution
- §11.6.5 Compile-time checking of dynamic member invocation
- §11.6.6 Function member invocation
- §11.7 Primary expressions
- §11.7.1 General
- §11.7.2 Literals
- §11.7.3 Interpolated string expressions
- §11.7.4 Simple names
- §11.7.5 Parenthesized expressions
- §11.7.6 Member access
- §11.7.7 Null Conditional Member Access
- §11.7.8 Invocation expressions
- §11.7.9 Null Conditional Invocation Expression
- §11.7.10 Element access
- §11.7.10.1 General
- §11.7.10.2 Array access
- §11.7.10.3 Indexer access
- §11.7.11 Null Conditional Element Access
- §11.7.12 This access
- §11.7.13 Base access
- §11.7.14 Postfix increment and decrement operators
- §11.7.15 The new operator
- §11.7.15.1 General
- §11.7.15.2 Object creation expressions
- §11.7.15.3 Object initializers
- §11.7.15.4 Collection initializers
- §11.7.15.5 Array creation expressions
- §11.7.15.6 Delegate creation expressions
- §11.7.15.7 Anonymous object creation expressions
- §11.7.16 The typeof operator
- §11.7.17 The sizeof operator
- §11.7.18 The checked and unchecked operators
- §11.7.19 Default value expressions
- §11.7.20 Nameof expressions
- §11.7.21 Anonymous method expressions
- §11.8 Unary operators
- §11.9 Arithmetic operators
- §11.10 Shift operators
- §11.11 Relational and type-testing operators
- §11.11.1 General
- §11.11.2 Integer comparison operators
- §11.11.3 Floating-point comparison operators
- §11.11.4 Decimal comparison operators
- §11.11.5 Boolean equality operators
- §11.11.6 Enumeration comparison operators
- §11.11.7 Reference type equality operators
- §11.11.8 String equality operators
- §11.11.9 Delegate equality operators
- §11.11.10 Equality operators between nullable value types and the null literal
- §11.11.11 The is operator
- §11.11.12 The as operator
- §11.12 Logical operators
- §11.13 Conditional logical operators
- §11.14 The null coalescing operator
- §11.15 Conditional operator
- §11.16 Anonymous function expressions
- §11.16.1 General
- §11.16.2 Anonymous function signatures
- §11.16.3 Anonymous function bodies
- §11.16.4 Overload resolution
- §11.16.5 Anonymous functions and dynamic binding
- §11.16.6 Outer variables
- §11.16.6.1 General
- §11.16.6.2 Captured outer variables
- §11.16.6.3 Instantiation of local variables
- §11.16.7 Evaluation of anonymous function expressions
- §11.16.8 Implementation Example
- §11.17 Query expressions
- §11.17.1 General
- §11.17.2 Ambiguities in query expressions
- §11.17.3 Query expression translation
- §11.17.3.1 General
- §11.17.3.2 select and group … by clauses with continuations
- §11.17.3.3 Explicit range variable types
- §11.17.3.4 Degenerate query expressions
- §11.17.3.5 From, let, where, join and orderby clauses
- §11.17.3.6 Select clauses
- §11.17.3.7 Group clauses
- §11.17.3.8 Transparent identifiers
- §11.17.4 The query-expression pattern
- §11.18 Assignment operators
- §11.19 Expression
- §11.20 Constant expressions
- §11.21 Boolean expressions
- §12 Statements
- §12.1 General
- §12.2 End points and reachability
- §12.3 Blocks
- §12.4 The empty statement
- §12.5 Labeled statements
- §12.6 Declaration statements
- §12.7 Expression statements
- §12.8 Selection statements
- §12.9 Iteration statements
- §12.10 Jump statements
- §12.11 The try statement
- §12.12 The checked and unchecked statements
- §12.13 The lock statement
- §12.14 The using statement
- §12.15 The yield statement
- §13 Namespaces
- §14 Classes
- §14.1 General
- §14.2 Class declarations
- §14.2.1 General
- §14.2.2 Class modifiers
- §14.2.2.1 General
- §14.2.2.2 Abstract classes
- §14.2.2.3 Sealed classes
- §14.2.2.4 Static classes
- §14.2.2.4.1 General
- §14.2.2.4.2 Referencing static class types
- §14.2.3 Type parameters
- §14.2.4 Class base specification
- §14.2.5 Type parameter constraints
- §14.2.6 Class body
- §14.2.7 Partial declarations
- §14.3 Class members
- §14.3.1 General
- §14.3.2 The instance type
- §14.3.3 Members of constructed types
- §14.3.4 Inheritance
- §14.3.5 The new modifier
- §14.3.6 Access modifiers
- §14.3.7 Constituent types
- §14.3.8 Static and instance members
- §14.3.9 Nested types
- §14.3.10 Reserved member names
- §14.3.10.1 General
- §14.3.10.2 Member names reserved for properties
- §14.3.10.3 Member names reserved for events
- §14.3.10.4 Member names reserved for indexers
- §14.3.10.5 Member names reserved for finalizers
- §14.4 Constants
- §14.5 Fields
- §14.6 Methods
- §14.7 Properties
- §14.8 Events
- §14.9 Indexers
- §14.10 Operators
- §14.11 Instance constructors
- §14.12 Static constructors
- §14.13 Finalizers
- §14.14 Iterators
- §14.14.1 General
- §14.14.2 Enumerator interfaces
- §14.14.3 Enumerable interfaces
- §14.14.4 Yield type
- §14.14.5 Enumerator objects
- §14.14.5.1 General
- §14.14.5.2 The MoveNext method
- §14.14.5.3 The Current property
- §14.14.5.4 The Dispose method
- §14.14.6 Enumerable objects
- §14.14.6.1 General
- §14.14.6.2 The GetEnumerator method
- §14.15 Async Functions
- §15 Structs
- §16 Arrays
- §17 Interfaces
- §18 Enums
- §19 Delegates
- §20 Exceptions
- §21 Attributes
- §21.1 General
- §21.2 Attribute classes
- §21.3 Attribute specification
- §21.4 Attribute instances
- §21.5 Reserved attributes
- §21.6 Attributes for interoperation
- §22 Unsafe code
- §A Grammar
- §B Portability issues
- §C Standard library
- §D Documentation comments
- §D.1 General
- §D.2 Introduction
- §D.3 Recommended tags
- §D.3.1 General
- §D.3.2 <c>
- §D.3.3 <code>
- §D.3.4 <example>
- §D.3.5 <exception>
- §D.3.6 <include>
- §D.3.7 <list>
- §D.3.8 <para>
- §D.3.9 <param>
- §D.3.10 <paramref>
- §D.3.11 <permission>
- §D.3.12 <remarks>
- §D.3.13 <returns>
- §D.3.14 <see>
- §D.3.15 <seealso>
- §D.3.16 <summary>
- §D.3.17 <typeparam>
- §D.3.18 <typeparamref>
- §D.3.19 <value>
- §D.4 Processing the documentation file
- §D.5 An example
- §E Bibliography