csharpspec
csharpspec copied to clipboard
C# language specification
C# Language Specification
Version 6
Microsoft has not yet released an official copy of the C#6 spec. This is an unofficial draft. When Microsoft does release its official copy, before end 2016 at the latest, then this current repository will be deleted. That's because I wouldn't want to have two copies of the C#6 spec floating around.
(This document is also available for download: csharp.pdf and csharp.docx)
- Introduction
- Hello world
- Program structure
- Types and variables
- Expressions
- Statements
- Classes and objects
- Lexical structure
- Programs
- Grammars
- Lexical analysis
- Tokens
- Pre-processing directives
- Basic concepts
- Application Startup
- Application termination
- Declarations
- Members
- Member access
- Signatures and overloading
- Scopes
- Namespace and type names
- Automatic memory management
- Execution order
- Types
- Value types
- Reference types
- Boxing and unboxing
- Constructed types
- Type parameters
- Expression tree types
- The dynamic type
- Variables
- Variable categories
- Default values
- Definite assignment
- Variable references
- Atomicity of variable references
- Conversions
- Implicit conversions
- Explicit conversions
- Standard conversions
- User-defined conversions
- Anonymous function conversions
- Method group conversions
- Expressions
- Expression classifications
- Static and Dynamic Binding
- Operators
- Member lookup
- Function members
- Primary expressions
- Unary operators
- Arithmetic operators
- Shift operators
- Relational and type-testing operators
- Logical operators
- Conditional logical operators
- The null coalescing operator
- Conditional operator
- Anonymous function expressions
- Query expressions
- Assignment operators
- Expression
- Constant expressions
- Boolean expressions
- Statements
- End points and reachability
- Blocks
- The empty statement
- Labeled statements
- Declaration statements
- Expression statements
- Selection statements
- Iteration statements
- Jump statements
- The try statement
- The checked and unchecked statements
- The lock statement
- The using statement
- The yield statement
- Namespaces
- Compilation units
- Namespace declarations
- Extern aliases
- Using directives
- Namespace members
- Type declarations
- Namespace alias qualifiers
- Classes
- Class declarations
- Partial types
- Class members
- Constants
- Fields
- Methods
- Properties
- Events
- Indexers
- Operators
- Instance constructors
- Static constructors
- Destructors
- Iterators
- Structs
- Struct declarations
- Struct members
- Class and struct differences
- Struct examples
- Arrays
- Array types
- Array creation
- Array element access
- Array members
- Array covariance
- Array initializers
- Interfaces
- Interface declarations
- Interface members
- Fully qualified interface member names
- Interface implementations
- Enums
- Enum declarations
- Enum modifiers
- Enum members
- The System.Enum type
- Enum values and operations
- Delegates
- Delegate declarations
- Delegate compatibility
- Delegate instantiation
- Delegate invocation
- Exceptions
- Causes of exceptions
- The System.Exception class
- How exceptions are handled
- Common Exception Classes
- Attributes
- Attribute classes
- Attribute specification
- Attribute instances
- Reserved attributes
- Attributes for Interoperation
- Unsafe code
- Unsafe contexts
- Pointer types
- Fixed and moveable variables
- Pointer conversions
- Pointers in expressions
- The fixed statement
- Fixed size buffers
- Stack allocation
- Dynamic memory allocation
- Documentation comments
- Introduction
- Recommended tags
- Processing the documentation file
- An example
- Grammar: csharp.html. Or download in ANTLR format: csharp.g4.