Skip to content

Publish the C# 9 alpha branch#52889

Open
BillWagner wants to merge 5 commits intodotnet:mainfrom
BillWagner:move-to-standard-9
Open

Publish the C# 9 alpha branch#52889
BillWagner wants to merge 5 commits intodotnet:mainfrom
BillWagner:move-to-standard-9

Conversation

@BillWagner
Copy link
Copy Markdown
Member

@BillWagner BillWagner commented Apr 7, 2026

Start the process of publishing the early alpha drafts in favor of the current committee working draft.

Fixes #52875


Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/csharp/language-reference/builtin-types/enum.md Enumeration types (C# reference)
docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md Errors and warnings when using lambda expressions and anonymous functions
docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md Resolve errors and warnings related to operator declarations and overflow
docs/csharp/language-reference/keywords/const.md The const keyword
docs/csharp/language-reference/operators/addition-operator.md Addition operators - + and +=
docs/csharp/language-reference/operators/arithmetic-operators.md Arithmetic operators (C# reference)
docs/csharp/language-reference/operators/assignment-operator.md docs/csharp/language-reference/operators/assignment-operator
docs/csharp/language-reference/operators/bitwise-and-shift-operators.md Bitwise and shift operators (C# reference)
docs/csharp/language-reference/operators/boolean-logical-operators.md "Boolean logical operators - the boolean and, or, not, and xor operators"
docs/csharp/language-reference/operators/comparison-operators.md Comparison operators (C# reference)
docs/csharp/language-reference/operators/conditional-operator.md docs/csharp/language-reference/operators/conditional-operator
docs/csharp/language-reference/operators/delegate-operator.md delegate operator
docs/csharp/language-reference/operators/equality-operators.md Equality operators - test if two objects are equal or not
docs/csharp/language-reference/operators/is.md "The is operator - Match an expression against a type or constant pattern"
docs/csharp/language-reference/operators/lambda-expressions.md Lambda expressions and anonymous functions
docs/csharp/language-reference/operators/lambda-operator.md docs/csharp/language-reference/operators/lambda-operator
docs/csharp/language-reference/operators/null-coalescing-operator.md ?? and ??= operators - the null-coalescing operators
docs/csharp/language-reference/operators/operator-overloading.md "Operator overloading - Define unary, arithmetic, equality, and comparison operators."
docs/csharp/language-reference/operators/subtraction-operator.md - and -= operators - subtraction (minus)
docs/csharp/language-reference/operators/switch-expression.md docs/csharp/language-reference/operators/switch-expression
docs/csharp/language-reference/operators/true-false-operators.md True and false operators
docs/csharp/language-reference/operators/type-testing-and-cast.md Type-testing operators and cast expressions - is, as, typeof, and casts
docs/csharp/linq/index.md Language Integrated Query (LINQ)
docs/csharp/specification/overview.md C# standard specification
docs/csharp/specification/toc.yml docs/csharp/specification/toc

Start the process of publishing the early alpha drafts in favor of the current committee working draft.
New version means lots of new clauses.
@BillWagner BillWagner force-pushed the move-to-standard-9 branch from f7f3dc9 to 28dff23 Compare April 9, 2026 21:04
Add clause number to the TOC.
@BillWagner BillWagner closed this Apr 10, 2026
@BillWagner BillWagner reopened this Apr 10, 2026
@BillWagner BillWagner marked this pull request as ready for review April 11, 2026 12:40
@BillWagner BillWagner requested a review from a team as a code owner April 11, 2026 12:40
Copilot AI review requested due to automatic review settings April 11, 2026 12:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR switches the published C# specification content from the current draft branch to an early C# 9 alpha draft, and updates multiple docs to point at the new section anchors in the specification.

Changes:

  • Update the C# specification TOC and overview to present the C# 9 early draft.
  • Revise many C# reference articles to link to updated section anchors in the spec.
  • Adjust build/publishing configuration to pull the spec from the alpha-v9 branch and stop publishing C# 9 proposal pages.

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
docs/csharp/specification/toc.yml Renames and restructures the specification TOC to target the C# 9 early draft and adds numbered chapter labels.
docs/csharp/specification/overview.md Updates the overview text and date to describe the early C# 9 draft.
docs/csharp/linq/index.md Updates the spec anchor for query expressions.
docs/csharp/language-reference/operators/type-testing-and-cast.md Updates spec anchors for is and as.
docs/csharp/language-reference/operators/true-false-operators.md Updates spec anchors for Boolean expressions and user-defined conditional logical operators.
docs/csharp/language-reference/operators/switch-expression.md Updates the spec anchor for switch expressions.
docs/csharp/language-reference/operators/subtraction-operator.md Updates spec anchors for delegate equality and subtraction operator sections.
docs/csharp/language-reference/operators/operator-overloading.md Updates the spec anchor for user-defined conditional logical operators in the non-overloadable operator table.
docs/csharp/language-reference/operators/null-coalescing-operator.md Updates spec anchors for null-coalescing and compound assignment sections.
docs/csharp/language-reference/operators/lambda-operator.md Updates the spec anchor for anonymous function expressions.
docs/csharp/language-reference/operators/lambda-expressions.md Updates the spec anchor for anonymous function expressions.
docs/csharp/language-reference/operators/is.md Updates the spec anchor for the is operator section.
docs/csharp/language-reference/operators/equality-operators.md Updates spec anchors for delegate equality and relational/type-testing operators.
docs/csharp/language-reference/operators/delegate-operator.md Updates the spec anchor for anonymous function expressions.
docs/csharp/language-reference/operators/conditional-operator.md Updates the spec anchor for the conditional operator section.
docs/csharp/language-reference/operators/comparison-operators.md Updates spec anchor for relational and type-testing operators.
docs/csharp/language-reference/operators/boolean-logical-operators.md Updates spec anchors for logical/conditional/compound assignment sections and user-defined conditional logical operators.
docs/csharp/language-reference/operators/bitwise-and-shift-operators.md Updates spec anchors for shift/logical/compound assignment sections.
docs/csharp/language-reference/operators/assignment-operator.md Updates spec anchor for assignment operators.
docs/csharp/language-reference/operators/arithmetic-operators.md Updates spec anchors for remainder/multiplication/division/addition/subtraction/compound assignment sections.
docs/csharp/language-reference/operators/addition-operator.md Updates spec anchor for addition operator section.
docs/csharp/language-reference/keywords/const.md Updates spec anchor for constant expressions section.
docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md Updates spec anchor for user-defined conditional logical operators.
docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md Updates spec anchors for anonymous function expressions references.
docs/csharp/language-reference/builtin-types/enum.md Updates spec anchors for enum logical/comparison operators.
docfx.json Updates doc build inputs/metadata, including removal of C# 9 proposal pages from the proposal doc set.
.openpublishing.publish.config.json Switches the _csharpstandard source branch from draft-v8 to alpha-v9.
Comments suppressed due to low confidence (2)

docs/csharp/language-reference/operators/conditional-operator.md:89

  • This page links to a C# 9 proposal doc (~/_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md). With this PR removing C# 9 proposal pages from the doc build, this link will likely break unless it’s updated to a different target (or the proposal pages stay published).
For more information, see the [Conditional operator](~/_csharpstandard/standard/expressions.md#1221-conditional-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md).

Specifications for newer features are:

- [Target-typed conditional expression](~/_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md)

docs/csharp/language-reference/operators/lambda-expressions.md:336

  • These feature proposal links point at C# 9 proposal docs under ~/_csharplang/proposals/csharp-9.0/…. Because this PR removes C# 9 proposal pages from the doc build, these links will likely break unless you update them to published targets (or restore publishing for C# 9 proposals).
For more information, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md).

For more information about these features, see the following feature proposal notes:

- [Lambda discard parameters](~/_csharplang/proposals/csharp-9.0/lambda-discard-parameters.md)
- [Static anonymous functions](~/_csharplang/proposals/csharp-9.0/static-anonymous-functions.md)
- [Lambda improvements](~/_csharplang/proposals/csharp-10.0/lambda-improvements.md)

Comment on lines 29 to 32
## User-defined conditional logical operators

If a type with the defined `true` and `false` operators [overloads](operator-overloading.md) the [logical OR operator](boolean-logical-operators.md#logical-or-operator-) `|` or the [logical AND operator](boolean-logical-operators.md#logical-and-operator-) `&` in a certain way, the [conditional logical OR operator](boolean-logical-operators.md#conditional-logical-or-operator-) `||` or [conditional logical AND operator](boolean-logical-operators.md#conditional-logical-and-operator-) `&&`, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md).
If a type with the defined `true` and `false` operators [overloads](operator-overloading.md) the [logical OR operator](boolean-logical-operators.md#logical-or-operator-) `|` or the [logical AND operator](boolean-logical-operators.md#logical-and-operator-) `&` in a certain way, the [conditional logical OR operator](boolean-logical-operators.md#conditional-logical-or-operator-) `||` or [conditional logical AND operator](boolean-logical-operators.md#conditional-logical-and-operator-) `&&`, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md).

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link URL has a trailing space before the closing ), which can produce a broken link in Markdown. Remove the trailing space from the User-defined conditional logical operators link destination.

Copilot uses AI. Check for mistakes.
Comment on lines 188 to 190

A user-defined type can't overload the conditional logical operators `&&` and `||`. However, if a user-defined type overloads the [true and false operators](true-false-operators.md) and the `&` or `|` operator in a certain way, the `&&` or `||` operation, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md).
A user-defined type can't overload the conditional logical operators `&&` and `||`. However, if a user-defined type overloads the [true and false operators](true-false-operators.md) and the `&` or `|` operator in a certain way, the `&&` or `||` operation, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md).

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The User-defined conditional logical operators link URL contains a trailing space before the closing ), which can break the link. Remove the trailing space from the link destination.

Copilot uses AI. Check for mistakes.
Comment on lines 63 to 65
| :---------: | --------------- |
|[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [<code>x &#124;&#124; y</code>](boolean-logical-operators.md#conditional-logical-or-operator-)| Overload both the [`true`](true-false-operators.md) and [`false`](true-false-operators.md) operators and the [`&`](boolean-logical-operators.md#logical-and-operator-) or [<code>&#124;</code>](boolean-logical-operators.md#logical-or-operator-) operators. For more information, see [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators ).|
|[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [<code>x &#124;&#124; y</code>](boolean-logical-operators.md#conditional-logical-or-operator-)| Overload both the [`true`](true-false-operators.md) and [`false`](true-false-operators.md) operators and the [`&`](boolean-logical-operators.md#logical-and-operator-) or [<code>&#124;</code>](boolean-logical-operators.md#logical-or-operator-) operators. For more information, see [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators ).|
|[<code>a&#91;i&#93;</code>](member-access-operators.md#indexer-operator-), [`a?[i]`](member-access-operators.md#null-conditional-operators--and-)|Define an [indexer](../../programming-guide/indexers/index.md).|
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The User-defined conditional logical operators link URL ends with a trailing space before ). Remove the trailing space to avoid a broken link.

Copilot uses AI. Check for mistakes.
Comment on lines 50 to 66
@@ -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/**"
]
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docfx.json no longer includes _csharplang/proposals/csharp-9.0/*.md in the published content, but multiple docs in the repo still link to those pages (for example, ~/_csharplang/proposals/csharp-9.0/records.md). Either keep publishing the C# 9 proposal pages, or update those references (and any redirects that target /dotnet/csharp/language-reference/proposals/csharp-9.0/...) so builds don’t ship broken links.

Copilot uses AI. Check for mistakes.
Comment on lines 106 to 110

For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1214-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md).
For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1215-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md).

For more information about equality of record types, see the [Equality members](~/_csharplang/proposals/csharp-9.0/records.md#equality-members) section of the [records feature proposal note](~/_csharplang/proposals/csharp-9.0/records.md).

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section links to the C# 9 records proposal (~/_csharplang/proposals/csharp-9.0/records.md). Since this PR stops publishing C# 9 proposal pages in docfx.json, this reference will likely become a broken link unless it’s updated to a published target (or the proposal pages remain included).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish the alpha branch of C# v9

2 participants