Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .openpublishing.publish.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
{
"path_to_root": "_csharpstandard",
"url": "https://github.com/dotnet/csharpstandard",
"branch": "draft-v8",
"branch": "alpha-v9",
"include_in_build": true,
"branch_mapping": {}
},
Expand Down
43 changes: 1 addition & 42 deletions docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
},
{
"files": [
"csharp-9.0/*.md",
"csharp-10.0/*.md",
"csharp-11.0/*.md",
"csharp-12.0/*.md",
Expand All @@ -63,11 +62,7 @@
"exclude": [
"**/README.md",
"inactive/**",
"rejected/**",
"csharp-9.0/nullable-reference-types-specification.md",
"csharp-9.0/nullable-constructor-analysis.md",
"csharp-9.0/nullable-parameter-default-value-analysis.md",
"csharp-9.0/skip-localsinit.md"
"rejected/**"
]
},
{
Expand Down Expand Up @@ -511,7 +506,6 @@
},
"ms.date": {
"_csharpstandard/standard/*.md": "09/12/2025",
"_csharplang/proposals/csharp-9.0/*.md": "07/29/2020",
"_csharplang/proposals/csharp-10.0/*.md": "08/07/2021",
"_csharplang/proposals/csharp-11.0/*.md": "09/30/2022",
"_csharplang/proposals/csharp-12.0/*.md": "08/15/2023",
Expand Down Expand Up @@ -626,23 +620,6 @@
"_csharpstandard/standard/standard-library.md": "Standard library",
"_csharpstandard/standard/documentation-comments.md": "Documentation comments",
"_csharpstandard/standard/Bibliography.md": "Bibliography",
"_csharplang/proposals/csharp-9.0/covariant-returns.md": "Covariant return types",
"_csharplang/proposals/csharp-9.0/extending-partial-methods.md": "Extending partial methods",
"_csharplang/proposals/csharp-9.0/extension-getenumerator.md": "Extension GetEnumerator support in foreach",
"_csharplang/proposals/csharp-9.0/function-pointers.md": "Function pointers",
"_csharplang/proposals/csharp-9.0/init.md": "Init only setters",
"_csharplang/proposals/csharp-9.0/lambda-discard-parameters.md": "Lambda discard parameters",
"_csharplang/proposals/csharp-9.0/local-function-attributes.md": "Attributes on local functions",
"_csharplang/proposals/csharp-9.0/module-initializers.md": "Module initializers",
"_csharplang/proposals/csharp-9.0/native-integers.md": "Native sized integers",
"_csharplang/proposals/csharp-9.0/patterns3.md": "Pattern matching changes",
"_csharplang/proposals/csharp-9.0/records.md": "Records",
"_csharplang/proposals/csharp-9.0/static-anonymous-functions.md": "Static anonymous functions",
"_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md": "Target-typed conditional expression",
"_csharplang/proposals/csharp-9.0/target-typed-new.md": "Target-typed new expressions",
"_csharplang/proposals/csharp-9.0/top-level-statements.md": "Top-level statements",
"_csharplang/proposals/csharp-9.0/unconstrained-type-parameter-annotations.md": "Unconstrained type parameter annotations",
"_csharplang/proposals/csharp-9.0/variance-safety-for-static-interface-members.md": "Variance safety for static interface members",
"_csharplang/proposals/csharp-10.0/record-structs.md": "Record structs",
"_csharplang/proposals/csharp-10.0/parameterless-struct-constructors.md": "Parameterless struct constructors",
"_csharplang/proposals/csharp-10.0/GlobalUsingDirective.md": "Global using directive",
Expand Down Expand Up @@ -755,23 +732,6 @@
"_csharpstandard/standard/standard-library.md": "This appendix lists requirements of the specification library. The C# language relies on these types for some of its behavior.",
"_csharpstandard/standard/documentation-comments.md": "This appendix describes XML comments that are used to document your program.",
"_csharpstandard/standard/Bibliography.md": "This appendix lists external standards referenced in this specification.",
"_csharplang/proposals/csharp-9.0/covariant-returns.md": "This feature specification describes covariant return types, where overriding member declarations can return a type derived from the overridden member declaration.",
"_csharplang/proposals/csharp-9.0/extending-partial-methods.md": "This feature specification describes extensions to partial methods. These extensions enable source generators to create or call partial methods.",
"_csharplang/proposals/csharp-9.0/extension-getenumerator.md": "This feature specification describes the necessary pattern for an extension method to provide the GetEnumerator support in a foreach loop.",
"_csharplang/proposals/csharp-9.0/function-pointers.md": "This feature specification describes function pointers, which are unmanaged delegates. They are typically used to avoid the allocations necessary to instantiate a delegate object.",
"_csharplang/proposals/csharp-9.0/init.md": "This feature specification describes the rules for 'init' only setters in properties. These can be set only as part of an instantiation, using property initializer syntax.",
"_csharplang/proposals/csharp-9.0/lambda-discard-parameters.md": "This feature specification describes the new language rules that enable the '_' to be a discard parameter in a lambda expression.",
"_csharplang/proposals/csharp-9.0/local-function-attributes.md": "This feature specification describes rules to apply attributes on local functions.",
"_csharplang/proposals/csharp-9.0/module-initializers.md": "This feature specification describes how to declare module initializers, which are methods called by the runtime when a module, or assembly, is loaded.",
"_csharplang/proposals/csharp-9.0/native-integers.md": "This feature specification describes native sized integers, which are integer types that use the processor's natural integral types.",
"_csharplang/proposals/csharp-9.0/patterns3.md": "This feature specification describes the additional pattern matching syntax added in C# 9.0. This includes relational patterns, 'and' and 'or' patterns, negated patterns and parenthesized patterns.",
"_csharplang/proposals/csharp-9.0/records.md": "This feature specification describes records. Records are reference types that provide value based equality semantics.",
"_csharplang/proposals/csharp-9.0/static-anonymous-functions.md": "This feature specification describes static anonymous functions. Static anonymous functions are lambda expressions that are prohibited from accessing variables in the enclosing scope. That prevents them from creating a closure.",
"_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md": "This feature specification describes syntax rules to find a best match for the target of a conditional expression (?:).",
"_csharplang/proposals/csharp-9.0/target-typed-new.md": "This feature specification describes the enhancements to 'new' where the target type can be inferred from the variable declaration.",
"_csharplang/proposals/csharp-9.0/top-level-statements.md": "This feature specification describes top-level statements, which are program statements that replace the typical 'Main' method enclosed in a startup class.",
"_csharplang/proposals/csharp-9.0/unconstrained-type-parameter-annotations.md": "This feature specification describes unconstrained type parameter annotations. This enables 'T?' to be used where 'T' is not constrained to be either a value type or a reference type.",
"_csharplang/proposals/csharp-9.0/variance-safety-for-static-interface-members.md": "This feature specification describes variance safety for static interface members",
"_csharplang/proposals/csharp-10.0/record-structs.md": "This feature specification describes record structs, which are structs where the compiler generates methods similar to those for record classes.",
"_csharplang/proposals/csharp-10.0/parameterless-struct-constructors.md": "This feature specification parameterless struct constructors, which can now be declared for structs. The rules for when they are called describe behavior in arrays and other variable declarations.",
"_csharplang/proposals/csharp-10.0/GlobalUsingDirective.md": "This feature specification describes global using directives, which add a using directive to every file compiled as part of an assembly.",
Expand Down Expand Up @@ -853,7 +813,6 @@
"titleSuffix": {
"docs/**/*.{md,yml}": ".NET",
"_csharpstandard/standard/*.md": "C# language specification",
"_csharplang/proposals/csharp-9.0/*.md": "C# feature specifications",
"_csharplang/proposals/csharp-10.0/*.md": "C# feature specifications",
"_csharplang/proposals/csharp-11.0/*.md": "C# feature specifications",
"_csharplang/proposals/csharp-12.0/*.md": "C# feature specifications",
Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/language-reference/builtin-types/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ For more information, see the following sections of the [C# language specificati

- [Enums](~/_csharpstandard/standard/enums.md)
- [Enum values and operations](~/_csharpstandard/standard/enums.md#206-enum-values-and-operations)
- [Enumeration logical operators](~/_csharpstandard/standard/expressions.md#12153-enumeration-logical-operators)
- [Enumeration comparison operators](~/_csharpstandard/standard/expressions.md#12146-enumeration-comparison-operators)
- [Enumeration logical operators](~/_csharpstandard/standard/expressions.md#12163-enumeration-logical-operators)
- [Enumeration comparison operators](~/_csharpstandard/standard/expressions.md#12156-enumeration-comparison-operators)
- [Explicit enumeration conversions](~/_csharpstandard/standard/conversions.md#1033-explicit-enumeration-conversions)
- [Implicit enumeration conversions](~/_csharpstandard/standard/conversions.md#1024-implicit-enumeration-conversions)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ The compiler also produces the following *informational* message:
- **CS8971**: Warning: *InterpolatedStringHandlerArgument has no effect when applied to lambda parameters and will be ignored at the call site.*
- **CS9236**: Informational: *Compiling requires binding the lambda expression at least count times. Consider declaring the lambda expression with explicit parameter types, or if the containing method call is generic, consider using explicit type arguments.*

The compiler prohibits certain C# constructs inside [lambda expressions](../operators/lambda-expressions.md) and [anonymous methods](../operators/delegate-operator.md). These restrictions exist because the compiler transforms lambdas and anonymous methods into [delegate](../../programming-guide/delegates/index.md) invocations or [expression trees](../../advanced-topics/expression-trees/index.md), and some constructs can't be represented in those forms. For more information, see the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the C# specification.
The compiler prohibits certain C# constructs inside [lambda expressions](../operators/lambda-expressions.md) and [anonymous methods](../operators/delegate-operator.md). These restrictions exist because the compiler transforms lambdas and anonymous methods into [delegate](../../programming-guide/delegates/index.md) invocations or [expression trees](../../advanced-topics/expression-trees/index.md), and some constructs can't be represented in those forms. For more information, see the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the C# specification.

You can correct these errors by using the following guidance:

Expand Down Expand Up @@ -197,7 +197,7 @@ You can correct these errors by using the following guidance:
- **CS8975**: *The contextual keyword 'var' cannot be used as an explicit lambda return type.*
- **CS9098**: *Implicitly typed lambda parameter '...' cannot have a default value.*

These errors indicate a problem with a [lambda expression parameter](../operators/lambda-expressions.md#input-parameters-of-a-lambda-expression) or return type declaration. For the full rules on lambda parameter and return types, see [lambda expressions](../operators/lambda-expressions.md), [anonymous methods](../operators/delegate-operator.md), and the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the C# specification.
These errors indicate a problem with a [lambda expression parameter](../operators/lambda-expressions.md#input-parameters-of-a-lambda-expression) or return type declaration. For the full rules on lambda parameter and return types, see [lambda expressions](../operators/lambda-expressions.md), [anonymous methods](../operators/delegate-operator.md), and the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the C# specification.

> [!NOTE]
> **CS1731** and **CS1732** are no longer produced by the current version of the C# compiler (Roslyn). They might appear if you're using an older compiler version.
Expand Down Expand Up @@ -228,7 +228,7 @@ You can correct these errors by using the following guidance:
- **CS9099**: Warning: *The default parameter value does not match in the target delegate type.*
- **CS9100**: Warning: *Parameter has params modifier in lambda but not in target delegate type.*

These errors indicate a problem with the [delegate type](../../programming-guide/delegates/index.md) that the compiler infers or expects for a [lambda expression](../operators/lambda-expressions.md), [anonymous method](../operators/delegate-operator.md), or [method group](~/_csharpstandard/standard/conversions.md#108-method-group-conversions). For the full rules on delegate conversions, see [lambda expressions](../operators/lambda-expressions.md), [anonymous methods](../operators/delegate-operator.md), and the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the C# specification.
These errors indicate a problem with the [delegate type](../../programming-guide/delegates/index.md) that the compiler infers or expects for a [lambda expression](../operators/lambda-expressions.md), [anonymous method](../operators/delegate-operator.md), or [method group](~/_csharpstandard/standard/conversions.md#108-method-group-conversions). For the full rules on delegate conversions, see [lambda expressions](../operators/lambda-expressions.md), [anonymous methods](../operators/delegate-operator.md), and the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the C# specification.

> [!NOTE]
> The current version of the C# compiler (Roslyn) doesn't produce **CS0467**. You might see this error if you're using an older compiler version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ The C# language restricts which types can participate in user-defined conversion
- **CS0217**: *In order to be applicable as a short-circuit operator, a user-defined logical operator must have the same return type as the type of its 2 parameters.*
- **CS0218**: *The type must contain declarations of operator true and operator false.*

The C# language requires specific pairings and signatures for Boolean operators and short-circuit evaluation. For the full rules, see [true and false operators](../operators/true-false-operators.md), [Boolean logical operators](../operators/boolean-logical-operators.md), and [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators) in the C# specification.
The C# language requires specific pairings and signatures for Boolean operators and short-circuit evaluation. For the full rules, see [true and false operators](../operators/true-false-operators.md), [Boolean logical operators](../operators/boolean-logical-operators.md), and [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators) in the C# specification.

- Change the return type of `operator true` and `operator false` to `bool` (**CS0215**). These operators determine whether a value is logically true or false, so the language requires them to return `bool`.
- Define the matching paired operator (**CS0216**). The language requires certain operators to be declared in pairs: `operator ==` with `operator !=`, `operator <` with `operator >`, `operator <=` with `operator >=`, and `operator true` with `operator false`.
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/language-reference/keywords/const.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The following example shows how to declare a local constant:
For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md):

- [Constants](~/_csharpstandard/standard/classes.md#154-constants)
- [Constant expressions](~/_csharpstandard/standard/expressions.md#1225-constant-expressions)
- [Constant expressions](~/_csharpstandard/standard/expressions.md#1226-constant-expressions)

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ A user-defined type can [overload](operator-overloading.md) the `+` operator. Wh

## C# language specification

For more information, see the [Unary plus operator](~/_csharpstandard/standard/expressions.md#1292-unary-plus-operator) and [Addition operator](~/_csharpstandard/standard/expressions.md#12125-addition-operator) sections of the [C# language specification](~/_csharpstandard/standard/README.md). For more information on overloading the compound assignment operators in C# 14 and later, see the [user defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) feature specification.
For more information, see the [Unary plus operator](~/_csharpstandard/standard/expressions.md#1292-unary-plus-operator) and [Addition operator](~/_csharpstandard/standard/expressions.md#12135-addition-operator) sections of the [C# language specification](~/_csharpstandard/standard/README.md). For more information on overloading the compound assignment operators in C# 14 and later, see the [user defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) feature specification.

## See also

Expand Down
Loading
Loading