From 64245b3309ff98ddefa34b2ea19c12a0c7397a31 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Tue, 7 Apr 2026 14:09:55 -0400 Subject: [PATCH 1/6] Publish the C# 9 alpha branch Start the process of publishing the early alpha drafts in favor of the current committee working draft. --- .openpublishing.publish.config.json | 2 +- docfx.json | 43 +-------------------------- docs/csharp/specification/overview.md | 8 ++--- docs/csharp/specification/toc.yml | 38 +---------------------- 4 files changed, 7 insertions(+), 84 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 68e80d3ae203c..2816dc86e0195 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -55,7 +55,7 @@ { "path_to_root": "_csharpstandard", "url": "https://github.com/dotnet/csharpstandard", - "branch": "draft-v8", + "branch": "v9-alpha", "include_in_build": true, "branch_mapping": {} }, diff --git a/docfx.json b/docfx.json index cf91a56bea755..1722f49bfed85 100644 --- a/docfx.json +++ b/docfx.json @@ -49,7 +49,6 @@ }, { "files": [ - "csharp-9.0/*.md", "csharp-10.0/*.md", "csharp-11.0/*.md", "csharp-12.0/*.md", @@ -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/**" ] }, { @@ -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", @@ -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", @@ -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.", @@ -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", diff --git a/docs/csharp/specification/overview.md b/docs/csharp/specification/overview.md index 7031f0fd6c4d1..0fa25fcdd51b4 100644 --- a/docs/csharp/specification/overview.md +++ b/docs/csharp/specification/overview.md @@ -1,15 +1,15 @@ --- title: "Standard specification" description: "Understand the relationships among the ECMA C# standard and the working draft." -ms.date: 04/08/2026 +ms.date: 04/10/2026 --- # C# standard specification -The [C# language specification](~/_csharpstandard/standard/README.md) is the definitive source for the C# language. The [ECMA C# standard committee (TC49-TG2)](https://www.ecma-international.org/task-groups/tc49-tg2/) produces the specification. The standard document versions align with the C# language versions. The C# 8 standard corresponds to C# 8.0. +The [C# language specification](~/_csharpstandard/standard/README.md) is the definitive source for the C# language. The [ECMA C# standard committee (TC49-TG2)](https://www.ecma-international.org/task-groups/tc49-tg2/) produces the specification. -The committee is currently working on version 8 of the standard. The draft published here is a feature complete draft of C# 8. The committee uses [Microsoft specifications](https://github.com/dotnet/csharplang/tree/main/proposals) and [language design meeting (LDM) notes](https://github.com/dotnet/csharplang/tree/main/meetings) to produce the specification. +The committee is currently working on version 8 of the standard. The draft published here is a feature complete early draft of C# 9. The committee uses [Microsoft specifications](https://github.com/dotnet/csharplang/tree/main/proposals) and [language design meeting (LDM) notes](https://github.com/dotnet/csharplang/tree/main/meetings) to produce the specification. -This section contains the latest working draft of the [C# language specification](~/_csharpstandard/standard/README.md). The latest working draft is published here before being submitted to ECMA for approval. The committee works in the [dotnet/csharpstandard](https://github.com/dotnet/csharpstandard) repository. You can track the committee's progress and participate in the standard work there. +This section contains an early working draft of the [C# language specification](~/_csharpstandard/standard/README.md). The committee works in the [dotnet/csharpstandard](https://github.com/dotnet/csharpstandard) repository. You can track the committee's progress and participate in the standard work there. > [!NOTE] > The committee works to update the C# language specification, but it fell behind the current implementation. For specifications about current features, see [Feature specifications](feature-spec-overview.md). diff --git a/docs/csharp/specification/toc.yml b/docs/csharp/specification/toc.yml index 14f9da84c8270..22d762a04c719 100644 --- a/docs/csharp/specification/toc.yml +++ b/docs/csharp/specification/toc.yml @@ -1,7 +1,7 @@ items: - name: C# specifications href: index.yml -- name: C# 8 draft specification +- name: C# 9 early draft specification items: - name: Overview href: overview.md @@ -83,22 +83,12 @@ items: href: ../../../_csharplang/proposals/csharp-13.0/esc-escape-sequence.md - name: "Ignored directives" href: ../../../_csharplang/proposals/csharp-14.0/ignored-directives.md - - name: Basic concepts - items: - - name: Top-level statements - href: ../../../_csharplang/proposals/csharp-9.0/top-level-statements.md - - name: Module initializers - href: ../../../_csharplang/proposals/csharp-9.0/module-initializers.md - name: Types items: - - name: Records - href: ../../../_csharplang/proposals/csharp-9.0/records.md - name: Record structs href: ../../../_csharplang/proposals/csharp-10.0/record-structs.md - name: File local types href: ../../../_csharplang/proposals/csharp-11.0/file-local-types.md - - name: Unconstrained type parameter annotations - href: ../../../_csharplang/proposals/csharp-9.0/unconstrained-type-parameter-annotations.md - name: Improved interpolated strings href: ../../../_csharplang/proposals/csharp-10.0/improved-interpolated-strings.md - name: Constant interpolated strings @@ -109,8 +99,6 @@ items: href: ../../../_csharplang/proposals/csharp-11.0/new-line-in-interpolation.md - name: UTF-8 string literals href: ../../../_csharplang/proposals/csharp-11.0/utf8-string-literals.md - - name: Native sized integers - href: ../../../_csharplang/proposals/csharp-9.0/native-integers.md - name: Numeric IntPtr href: ../../../_csharplang/proposals/csharp-11.0/numeric-intptr.md - name: Named and optional parameters in expression trees @@ -127,8 +115,6 @@ items: href: ../../../_csharplang/proposals/csharp-14.0/first-class-span-types.md - name: Patterns items: - - name: Pattern matching enhancements - href: ../../../_csharplang/proposals/csharp-9.0/patterns3.md - name: Extended property patterns href: ../../../_csharplang/proposals/csharp-10.0/extended-property-patterns.md - name: Pattern match span @@ -137,24 +123,12 @@ items: href: ../../../_csharplang/proposals/csharp-11.0/list-patterns.md - name: Expressions items: - - name: Target-typed new expressions - href: ../../../_csharplang/proposals/csharp-9.0/target-typed-new.md - - name: Target-typed conditional expression - href: ../../../_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md - - name: Extension GetEnumerator in foreach loops - href: ../../../_csharplang/proposals/csharp-9.0/extension-getenumerator.md - name: Collection expressions href: ../../../_csharplang/proposals/csharp-12.0/collection-expressions.md - name: Better conversion from collection expression href: ../../../_csharplang/proposals/csharp-13.0/collection-expressions-better-conversion.md - name: Collection expression arguments href: ../../../_csharplang/proposals/collection-expression-arguments.md - - name: Lambda discard parameters - href: ../../../_csharplang/proposals/csharp-9.0/lambda-discard-parameters.md - - name: Static anonymous functions - href: ../../../_csharplang/proposals/csharp-9.0/static-anonymous-functions.md - - name: Function pointers - href: ../../../_csharplang/proposals/csharp-9.0/function-pointers.md - name: Lambda improvements href: ../../../_csharplang/proposals/csharp-10.0/lambda-improvements.md - name: Method group natural type conversion @@ -187,8 +161,6 @@ items: href: ../../../_csharplang/proposals/csharp-10.0/GlobalUsingDirective.md - name: Alias any type href: ../../../_csharplang/proposals/csharp-12.0/using-alias-types.md - - name: Attributes on local functions - href: ../../../_csharplang/proposals/csharp-9.0/local-function-attributes.md - name: Lock object semantics href: ../../../_csharplang/proposals/csharp-13.0/lock-object.md - name: Allow `ref` and `unsafe` @@ -199,20 +171,14 @@ items: href: ../../../_csharplang/proposals/csharp-10.0/file-scoped-namespaces.md - name: Classes items: - - name: Extending partial methods - href: ../../../_csharplang/proposals/csharp-9.0/extending-partial-methods.md - name: Partial properties href: ../../../_csharplang/proposals/csharp-13.0/partial-properties.md - name: Partial events and constructors href: ../../../_csharplang/proposals/csharp-14.0/partial-events-and-constructors.md - name: Field backed properties href: ../../../_csharplang/proposals/csharp-14.0/field-keyword.md - - name: Covariant return types - href: ../../../_csharplang/proposals/csharp-9.0/covariant-returns.md - name: Primary constructors href: ../../../_csharplang/proposals/csharp-12.0/primary-constructors.md - - name: Init only setters - href: ../../../_csharplang/proposals/csharp-9.0/init.md - name: Required members href: ../../../_csharplang/proposals/csharp-11.0/required-members.md - name: AsyncMethodBuilder override @@ -239,8 +205,6 @@ items: href: ../../../_csharplang/proposals/unions.md - name: Interfaces items: - - name: Variance safety for static interface members - href: ../../../_csharplang/proposals/csharp-9.0/variance-safety-for-static-interface-members.md - name: Static abstracts in interfaces href: ../../../_csharplang/proposals/csharp-11.0/static-abstracts-in-interfaces.md - name: Allow ref struct interfaces From ebf85f5f0e13edb8121f407b5e1436dee7cb835d Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Tue, 7 Apr 2026 14:20:47 -0400 Subject: [PATCH 2/6] fix branch name. --- .openpublishing.publish.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 2816dc86e0195..0095bd26b54f2 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -55,7 +55,7 @@ { "path_to_root": "_csharpstandard", "url": "https://github.com/dotnet/csharpstandard", - "branch": "v9-alpha", + "branch": "alpha-v9", "include_in_build": true, "branch_mapping": {} }, From 28dff233371f729db32b8d3d1a03fd05e0946387 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Tue, 7 Apr 2026 14:32:54 -0400 Subject: [PATCH 3/6] Fix build warnings New version means lots of new clauses. --- .../language-reference/builtin-types/enum.md | 4 ++-- .../compiler-messages/lambda-expression-errors.md | 6 +++--- .../overloaded-operator-errors.md | 2 +- docs/csharp/language-reference/keywords/const.md | 2 +- .../operators/addition-operator.md | 2 +- .../operators/arithmetic-operators.md | 14 +++++++------- .../operators/assignment-operator.md | 2 +- .../operators/bitwise-and-shift-operators.md | 6 +++--- .../operators/boolean-logical-operators.md | 8 ++++---- .../operators/comparison-operators.md | 2 +- .../operators/conditional-operator.md | 2 +- .../operators/delegate-operator.md | 2 +- .../operators/equality-operators.md | 4 ++-- docs/csharp/language-reference/operators/is.md | 2 +- .../operators/lambda-expressions.md | 2 +- .../operators/lambda-operator.md | 2 +- .../operators/null-coalescing-operator.md | 4 ++-- .../operators/operator-overloading.md | 2 +- .../operators/subtraction-operator.md | 4 ++-- .../operators/switch-expression.md | 2 +- .../operators/true-false-operators.md | 4 ++-- .../operators/type-testing-and-cast.md | 4 ++-- docs/csharp/linq/index.md | 2 +- 23 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/csharp/language-reference/builtin-types/enum.md b/docs/csharp/language-reference/builtin-types/enum.md index 9b52752de7e86..1d5a74b5b009b 100644 --- a/docs/csharp/language-reference/builtin-types/enum.md +++ b/docs/csharp/language-reference/builtin-types/enum.md @@ -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) diff --git a/docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md b/docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md index 3e48ee9fe67bb..3d00bdc536006 100644 --- a/docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md +++ b/docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md @@ -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: @@ -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. @@ -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. diff --git a/docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md b/docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md index 98afa3c0e04f3..8f7df8e90337c 100644 --- a/docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md +++ b/docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md @@ -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`. diff --git a/docs/csharp/language-reference/keywords/const.md b/docs/csharp/language-reference/keywords/const.md index 29d0e51fdf5cd..bc0dcd3dabe3e 100644 --- a/docs/csharp/language-reference/keywords/const.md +++ b/docs/csharp/language-reference/keywords/const.md @@ -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 diff --git a/docs/csharp/language-reference/operators/addition-operator.md b/docs/csharp/language-reference/operators/addition-operator.md index 9902085a34b30..0c2b32e8afcfd 100644 --- a/docs/csharp/language-reference/operators/addition-operator.md +++ b/docs/csharp/language-reference/operators/addition-operator.md @@ -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 diff --git a/docs/csharp/language-reference/operators/arithmetic-operators.md b/docs/csharp/language-reference/operators/arithmetic-operators.md index 30114eab8d9c9..e762f1c74315e 100644 --- a/docs/csharp/language-reference/operators/arithmetic-operators.md +++ b/docs/csharp/language-reference/operators/arithmetic-operators.md @@ -140,7 +140,7 @@ For the `float` and `double` operands, the result of `x % y` for the finite `x` > [!NOTE] > This method of computing the remainder is similar to the method used for integer operands, but it differs from the IEEE 754 specification. If you need the remainder operation that complies with the IEEE 754 specification, use the method. -For information about the behavior of the `%` operator with non-finite operands, see the [Remainder operator](~/_csharpstandard/standard/expressions.md#12124-remainder-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For information about the behavior of the `%` operator with non-finite operands, see the [Remainder operator](~/_csharpstandard/standard/expressions.md#12134-remainder-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). For `decimal` operands, the remainder operator `%` works the same as the [remainder operator]() of the type. @@ -289,12 +289,12 @@ For more information, see the following sections of the [C# language specificati - [Prefix increment and decrement operators](~/_csharpstandard/standard/expressions.md#1297-prefix-increment-and-decrement-operators) - [Unary plus operator](~/_csharpstandard/standard/expressions.md#1292-unary-plus-operator) - [Unary minus operator](~/_csharpstandard/standard/expressions.md#1293-unary-minus-operator) -- [Multiplication operator](~/_csharpstandard/standard/expressions.md#12122-multiplication-operator) -- [Division operator](~/_csharpstandard/standard/expressions.md#12123-division-operator) -- [Remainder operator](~/_csharpstandard/standard/expressions.md#12124-remainder-operator) -- [Addition operator](~/_csharpstandard/standard/expressions.md#12125-addition-operator) -- [Subtraction operator](~/_csharpstandard/standard/expressions.md#12126-subtraction-operator) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#12235-compound-assignment) +- [Multiplication operator](~/_csharpstandard/standard/expressions.md#12132-multiplication-operator) +- [Division operator](~/_csharpstandard/standard/expressions.md#12133-division-operator) +- [Remainder operator](~/_csharpstandard/standard/expressions.md#12134-remainder-operator) +- [Addition operator](~/_csharpstandard/standard/expressions.md#12135-addition-operator) +- [Subtraction operator](~/_csharpstandard/standard/expressions.md#12136-subtraction-operator) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment) - [The checked and unchecked operators](~/_csharpstandard/standard/expressions.md#12820-the-checked-and-unchecked-operators) - [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) - [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) diff --git a/docs/csharp/language-reference/operators/assignment-operator.md b/docs/csharp/language-reference/operators/assignment-operator.md index ea1614e86ce0b..4660f0c544b23 100644 --- a/docs/csharp/language-reference/operators/assignment-operator.md +++ b/docs/csharp/language-reference/operators/assignment-operator.md @@ -83,7 +83,7 @@ If a user-defined type overloads a binary operator `op`, the `op=` operator, if ## C# language specification -For more information, see the [Assignment operators](~/_csharpstandard/standard/expressions.md#1223-assignment-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) feature specification. +For more information, see the [Assignment operators](~/_csharpstandard/standard/expressions.md#1224-assignment-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) feature specification. ## See also diff --git a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md index a0e350ec49e8f..a88003f1fc897 100644 --- a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md +++ b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md @@ -197,9 +197,9 @@ If a user-defined type `T` overloads the `<<`, `>>`, or `>>>` operator, the type For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): - [Bitwise complement operator](~/_csharpstandard/standard/expressions.md#1295-bitwise-complement-operator) -- [Shift operators](~/_csharpstandard/standard/expressions.md#1213-shift-operators) -- [Logical operators](~/_csharpstandard/standard/expressions.md#1215-logical-operators) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#12235-compound-assignment) +- [Shift operators](~/_csharpstandard/standard/expressions.md#1214-shift-operators) +- [Logical operators](~/_csharpstandard/standard/expressions.md#1216-logical-operators) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment) - [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) - [Relaxed shift requirements](~/_csharplang/proposals/csharp-11.0/relaxing_shift_operator_requirements.md) - [Logical right-shift operator](~/_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md) diff --git a/docs/csharp/language-reference/operators/boolean-logical-operators.md b/docs/csharp/language-reference/operators/boolean-logical-operators.md index c2957f3e915a0..31b5c8650c700 100644 --- a/docs/csharp/language-reference/operators/boolean-logical-operators.md +++ b/docs/csharp/language-reference/operators/boolean-logical-operators.md @@ -186,16 +186,16 @@ For the complete list of C# operators ordered by precedence level, see the [Oper A user-defined type can [overload](operator-overloading.md) the `!`, `&`, `|`, and `^` operators. When a binary operator is overloaded, the corresponding compound assignment operator is also implicitly overloaded. Beginning with C# 14, a user-defined type can explicitly overload the compound assignment operators to provide a more efficient implementation. Typically, a type overloads these operators because the value can be updated in place, rather than allocating a new instance to hold the result of the binary operation. If a type doesn't provide an explicit overload, the compiler generates the implicit overload. -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). ## C# language specification For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): - [Logical negation operator](~/_csharpstandard/standard/expressions.md#1294-logical-negation-operator) -- [Logical operators](~/_csharpstandard/standard/expressions.md#1215-logical-operators) -- [Conditional logical operators](~/_csharpstandard/standard/expressions.md#1216-conditional-logical-operators) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#12235-compound-assignment) +- [Logical operators](~/_csharpstandard/standard/expressions.md#1216-logical-operators) +- [Conditional logical operators](~/_csharpstandard/standard/expressions.md#1217-conditional-logical-operators) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment) - [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) ## See also diff --git a/docs/csharp/language-reference/operators/comparison-operators.md b/docs/csharp/language-reference/operators/comparison-operators.md index ab7ba8bba54ea..15963e328b9ec 100644 --- a/docs/csharp/language-reference/operators/comparison-operators.md +++ b/docs/csharp/language-reference/operators/comparison-operators.md @@ -67,7 +67,7 @@ If you overload one of the `<` or `>` operators, you must overload both `<` and ## C# language specification -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). ## See also diff --git a/docs/csharp/language-reference/operators/conditional-operator.md b/docs/csharp/language-reference/operators/conditional-operator.md index e16a0ddb336a1..6d594006b76c0 100644 --- a/docs/csharp/language-reference/operators/conditional-operator.md +++ b/docs/csharp/language-reference/operators/conditional-operator.md @@ -81,7 +81,7 @@ A user-defined type can't overload the conditional operator. ## C# language specification -For more information, see the [Conditional operator](~/_csharpstandard/standard/expressions.md#1220-conditional-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). +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: diff --git a/docs/csharp/language-reference/operators/delegate-operator.md b/docs/csharp/language-reference/operators/delegate-operator.md index ac476ebf0f845..fb591430a677b 100644 --- a/docs/csharp/language-reference/operators/delegate-operator.md +++ b/docs/csharp/language-reference/operators/delegate-operator.md @@ -55,7 +55,7 @@ Action a = StaticFunction; ## C# language specification -For more information, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +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). ## See also diff --git a/docs/csharp/language-reference/operators/equality-operators.md b/docs/csharp/language-reference/operators/equality-operators.md index 52548cd4a1cdb..454d54ea3dfc2 100644 --- a/docs/csharp/language-reference/operators/equality-operators.md +++ b/docs/csharp/language-reference/operators/equality-operators.md @@ -78,7 +78,7 @@ Two [delegate](../../programming-guide/delegates/index.md) operands of the same :::code language="csharp" source="snippets/shared/EqualityOperators.cs" id="SnippetCheckReceiver"::: -For more information, see the [Delegate equality operators](~/_csharpstandard/standard/expressions.md#12149-delegate-equality-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Delegate equality operators](~/_csharpstandard/standard/expressions.md#12159-delegate-equality-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). Delegates that come from evaluating semantically identical [lambda expressions](lambda-expressions.md) aren't equal, as the following example shows: @@ -104,7 +104,7 @@ public virtual bool Equals(T? other); ## C# language specification -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). diff --git a/docs/csharp/language-reference/operators/is.md b/docs/csharp/language-reference/operators/is.md index a64918a661e95..2ec9dbe54a6a4 100644 --- a/docs/csharp/language-reference/operators/is.md +++ b/docs/csharp/language-reference/operators/is.md @@ -45,7 +45,7 @@ The `is` operator can be useful in the following scenarios: ## C# language specification -For more information, see [The is operator](~/_csharpstandard/standard/expressions.md#121412-the-is-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md) and [Pattern matching](/dotnet/csharp/language-reference/language-specification/patterns). +For more information, see [The is operator](~/_csharpstandard/standard/expressions.md#121512-the-is-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md) and [Pattern matching](/dotnet/csharp/language-reference/language-specification/patterns). ## See also diff --git a/docs/csharp/language-reference/operators/lambda-expressions.md b/docs/csharp/language-reference/operators/lambda-expressions.md index 7ee97a6bad710..4d5517c426207 100644 --- a/docs/csharp/language-reference/operators/lambda-expressions.md +++ b/docs/csharp/language-reference/operators/lambda-expressions.md @@ -327,7 +327,7 @@ A static lambda can't capture local variables or instance state from enclosing s ## C# language specification -For more information, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +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: diff --git a/docs/csharp/language-reference/operators/lambda-operator.md b/docs/csharp/language-reference/operators/lambda-operator.md index bf266abdf8cd0..57faf7ac0c3b6 100644 --- a/docs/csharp/language-reference/operators/lambda-operator.md +++ b/docs/csharp/language-reference/operators/lambda-operator.md @@ -74,7 +74,7 @@ You can't overload the `=>` operator. ## C# language specification -For more information about the lambda operator, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information about the lambda operator, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/null-coalescing-operator.md b/docs/csharp/language-reference/operators/null-coalescing-operator.md index 3c30f2da6fbb4..bbfcd02f3ee73 100644 --- a/docs/csharp/language-reference/operators/null-coalescing-operator.md +++ b/docs/csharp/language-reference/operators/null-coalescing-operator.md @@ -80,9 +80,9 @@ You can't overload the `??` and `??=` operators. ## C# language specification -For more information about the `??` operator, see [The null coalescing operator](~/_csharpstandard/standard/expressions.md#1217-the-null-coalescing-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information about the `??` operator, see [The null coalescing operator](~/_csharpstandard/standard/expressions.md#1218-the-null-coalescing-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). -For more information about the `??=` operator, see the [Compound assignment](~/_csharpstandard/standard/expressions.md#12235-compound-assignment) section of the C# language specification. +For more information about the `??=` operator, see the [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment) section of the C# language specification. ## See also diff --git a/docs/csharp/language-reference/operators/operator-overloading.md b/docs/csharp/language-reference/operators/operator-overloading.md index 89e9d02c5693c..0d63decae4c66 100644 --- a/docs/csharp/language-reference/operators/operator-overloading.md +++ b/docs/csharp/language-reference/operators/operator-overloading.md @@ -61,7 +61,7 @@ The following table shows the operators that can't be overloaded: | Operators | Alternatives | | :---------: | --------------- | -|[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [x || y](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 [|](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-), [x || y](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 [|](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 ).| |[a[i]](member-access-operators.md#indexer-operator-), [`a?[i]`](member-access-operators.md#null-conditional-operators--and-)|Define an [indexer](../../programming-guide/indexers/index.md).| |[`(T)x`](type-testing-and-cast.md#cast-expression)|Define custom type conversions performed by a cast expression. For more information, see [User-defined conversion operators](user-defined-conversion-operators.md).| |[`^x`](member-access-operators.md#index-from-end-operator-), [`x = y`](assignment-operator.md), [`x.y`](member-access-operators.md#member-access-expression-), [`x?.y`](member-access-operators.md#null-conditional-operators--and-), [`c ? t : f`](conditional-operator.md), [`x ?? y`](null-coalescing-operator.md), [`??= y`](null-coalescing-operator.md),
[`x..y`](member-access-operators.md#range-operator-), [`x->y`](pointer-related-operators.md#pointer-member-access-operator--), [`=>`](lambda-operator.md), [`f(x)`](member-access-operators.md#invocation-expression-), [`as`](type-testing-and-cast.md#the-as-operator), [`await`](await.md), [`checked`](../statements/checked-and-unchecked.md), [`unchecked`](../statements/checked-and-unchecked.md), [`default`](default.md), [`delegate`](delegate-operator.md), [`is`](type-testing-and-cast.md#the-is-operator), [`nameof`](nameof.md), [`new`](new-operator.md),
[`sizeof`](sizeof.md), [`stackalloc`](stackalloc.md), [`switch`](switch-expression.md), [`typeof`](type-testing-and-cast.md#the-typeof-operator), [`with`](with-expression.md)|None.| diff --git a/docs/csharp/language-reference/operators/subtraction-operator.md b/docs/csharp/language-reference/operators/subtraction-operator.md index 2a605161d3c6b..9d7495af310d5 100644 --- a/docs/csharp/language-reference/operators/subtraction-operator.md +++ b/docs/csharp/language-reference/operators/subtraction-operator.md @@ -33,7 +33,7 @@ For operands of the same [delegate](../builtin-types/reference-types.md#the-dele :::code language="csharp" source="snippets/shared/SubtractionOperator.cs" id="DelegateRemovalNoChange"::: - The preceding example also demonstrates that during delegate removal delegate instances are compared. For example, delegates that are produced from evaluation of identical [lambda expressions](lambda-expressions.md) aren't equal. For more information about delegate equality, see the [Delegate equality operators](~/_csharpstandard/standard/expressions.md#12149-delegate-equality-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). + The preceding example also demonstrates that during delegate removal delegate instances are compared. For example, delegates that are produced from evaluation of identical [lambda expressions](lambda-expressions.md) aren't equal. For more information about delegate equality, see the [Delegate equality operators](~/_csharpstandard/standard/expressions.md#12159-delegate-equality-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). - If the left-hand operand is `null`, the result of the operation is `null`. If the right-hand operand is `null`, the result of the operation is the left-hand operand. @@ -71,7 +71,7 @@ A user-defined type can [overload](operator-overloading.md) the `-` operator. Wh ## C# language specification -For more information, see the [Unary minus operator](~/_csharpstandard/standard/expressions.md#1293-unary-minus-operator) and [Subtraction operator](~/_csharpstandard/standard/expressions.md#12126-subtraction-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 minus operator](~/_csharpstandard/standard/expressions.md#1293-unary-minus-operator) and [Subtraction operator](~/_csharpstandard/standard/expressions.md#12136-subtraction-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 diff --git a/docs/csharp/language-reference/operators/switch-expression.md b/docs/csharp/language-reference/operators/switch-expression.md index cbd6d489773c8..00f9c9ea2c03a 100644 --- a/docs/csharp/language-reference/operators/switch-expression.md +++ b/docs/csharp/language-reference/operators/switch-expression.md @@ -54,7 +54,7 @@ For [union types](../builtin-types/union.md), a `switch` expression is exhaustiv ## C# language specification -For more information, see the [`switch` expression](~/_csharpstandard/standard/expressions.md#1211-switch-expression) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [`switch` expression](~/_csharpstandard/standard/expressions.md#1212-switch-expression) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/true-false-operators.md b/docs/csharp/language-reference/operators/true-false-operators.md index 23778d67330ca..a1f661e53707f 100644 --- a/docs/csharp/language-reference/operators/true-false-operators.md +++ b/docs/csharp/language-reference/operators/true-false-operators.md @@ -24,11 +24,11 @@ The `true` and `false` operators aren't guaranteed to complement each other. Tha ## Boolean expressions -A type with the defined `true` operator can be the type of a result of a controlling conditional expression in the [if](../statements/selection-statements.md#the-if-statement), [do](../statements/iteration-statements.md#the-do-statement), [while](../statements/iteration-statements.md#the-while-statement), and [for](../statements/iteration-statements.md#the-for-statement) statements and in the [conditional operator `?:`](conditional-operator.md). For more information, see the [Boolean expressions](~/_csharpstandard/standard/expressions.md#1226-boolean-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +A type with the defined `true` operator can be the type of a result of a controlling conditional expression in the [if](../statements/selection-statements.md#the-if-statement), [do](../statements/iteration-statements.md#the-do-statement), [while](../statements/iteration-statements.md#the-while-statement), and [for](../statements/iteration-statements.md#the-for-statement) statements and in the [conditional operator `?:`](conditional-operator.md). For more information, see the [Boolean expressions](~/_csharpstandard/standard/expressions.md#1227-boolean-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## 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). ## Example diff --git a/docs/csharp/language-reference/operators/type-testing-and-cast.md b/docs/csharp/language-reference/operators/type-testing-and-cast.md index 7438e9262b1c5..51b832fd04cfa 100644 --- a/docs/csharp/language-reference/operators/type-testing-and-cast.md +++ b/docs/csharp/language-reference/operators/type-testing-and-cast.md @@ -147,8 +147,8 @@ A user-defined type can't overload the `()` operator, but it can define custom t For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [The `is` operator](~/_csharpstandard/standard/expressions.md#121412-the-is-operator) -- [The `as` operator](~/_csharpstandard/standard/expressions.md#121413-the-as-operator) +- [The `is` operator](~/_csharpstandard/standard/expressions.md#121512-the-is-operator) +- [The `as` operator](~/_csharpstandard/standard/expressions.md#121513-the-as-operator) - [Cast expressions](~/_csharpstandard/standard/expressions.md#1298-cast-expressions) - [The `typeof` operator](~/_csharpstandard/standard/expressions.md#12818-the-typeof-operator) diff --git a/docs/csharp/linq/index.md b/docs/csharp/linq/index.md index 6d10b3c8c5c46..4bac7a21ed3b0 100644 --- a/docs/csharp/linq/index.md +++ b/docs/csharp/linq/index.md @@ -23,7 +23,7 @@ You might need to add a [`using`](../language-reference/keywords/using-directive - Query expressions use many familiar C# language constructs, which make them easy to read. - The variables in a query expression are all strongly typed. - A query isn't executed until you iterate over the query variable, for example in a `foreach` statement. -- At compile time, the compiler converts query expressions to standard query operator method calls according to the rules defined in the C# specification. You can express any query that uses query syntax by using method syntax. In some cases, query syntax is more readable and concise. In others, method syntax is more readable. There's no semantic or performance difference between the two different forms. For more information, see [C# language specification](~/_csharpstandard/standard/expressions.md#1222-query-expressions) and [Standard query operators overview](standard-query-operators/index.md). +- At compile time, the compiler converts query expressions to standard query operator method calls according to the rules defined in the C# specification. You can express any query that uses query syntax by using method syntax. In some cases, query syntax is more readable and concise. In others, method syntax is more readable. There's no semantic or performance difference between the two different forms. For more information, see [C# language specification](~/_csharpstandard/standard/expressions.md#1223-query-expressions) and [Standard query operators overview](standard-query-operators/index.md). - Some query operations, such as or , have no equivalent query expression clause and must be expressed as a method call. You can combine method syntax with query syntax in various ways. - Query expressions can be compiled to expression trees or to delegates, depending on the type that the query is applied to. The compiler compiles queries to delegates. The compiler compiles and queries to expression trees. For more information, see [Expression trees](/dotnet/csharp/advanced-topics/expression-trees). From 89be3121e654413774d382cd792367c52ce62031 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Fri, 10 Apr 2026 18:13:54 -0400 Subject: [PATCH 4/6] Add items to TOC Add clause number to the TOC. --- docs/csharp/specification/toc.yml | 58 +++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/csharp/specification/toc.yml b/docs/csharp/specification/toc.yml index 22d762a04c719..84b07fbfad35f 100644 --- a/docs/csharp/specification/toc.yml +++ b/docs/csharp/specification/toc.yml @@ -12,63 +12,63 @@ items: href: ../../../_csharpstandard/standard/foreword.md - name: Introduction href: ../../../_csharpstandard/standard/introduction.md - - name: Scope + - name: 1. Scope href: ../../../_csharpstandard/standard/scope.md - - name: Normative references + - name: 2. Normative references href: ../../../_csharpstandard/standard/normative-references.md - - name: Terms and definitions + - name: 3. Terms and definitions href: ../../../_csharpstandard/standard/terms-and-definitions.md - - name: General description + - name: 4. General description href: ../../../_csharpstandard/standard/general-description.md - - name: Conformance + - name: 5. Conformance href: ../../../_csharpstandard/standard/conformance.md - - name: Lexical structure + - name: 6. Lexical structure href: ../../../_csharpstandard/standard/lexical-structure.md - - name: Basic concepts + - name: 7. Basic concepts href: ../../../_csharpstandard/standard/basic-concepts.md - - name: Types + - name: 8. Types href: ../../../_csharpstandard/standard/types.md - - name: Variables + - name: 9. Variables href: ../../../_csharpstandard/standard/variables.md - - name: Conversions + - name: 10. Conversions href: ../../../_csharpstandard/standard/conversions.md - - name: Patterns + - name: 11. Patterns href: ../../../_csharpstandard/standard/patterns.md - - name: Expressions + - name: 12. Expressions href: ../../../_csharpstandard/standard/expressions.md - - name: Statements + - name: 13. Statements href: ../../../_csharpstandard/standard/statements.md - - name: Namespaces + - name: 14. Namespaces href: ../../../_csharpstandard/standard/namespaces.md - - name: Classes + - name: 15. Classes href: ../../../_csharpstandard/standard/classes.md - - name: Structs + - name: 16. Structs href: ../../../_csharpstandard/standard/structs.md - - name: Arrays + - name: 17. Arrays href: ../../../_csharpstandard/standard/arrays.md - - name: Extended indexing and slicing + - name: 18. Extended indexing and slicing href: ../../../_csharpstandard/standard/ranges.md - - name: Interfaces + - name: 19. Interfaces href: ../../../_csharpstandard/standard/interfaces.md - - name: Enums + - name: 20. Enums href: ../../../_csharpstandard/standard/enums.md - - name: Delegates + - name: 21. Delegates href: ../../../_csharpstandard/standard/delegates.md - - name: Exceptions + - name: 22. Exceptions href: ../../../_csharpstandard/standard/exceptions.md - - name: Attributes + - name: 23. Attributes href: ../../../_csharpstandard/standard/attributes.md - - name: Unsafe code + - name: 24. Unsafe code href: ../../../_csharpstandard/standard/unsafe-code.md - - name: Grammar + - name: A. Grammar href: ../../../_csharpstandard/standard/grammar.md - - name: Portability issues + - name: B. Portability issues href: ../../../_csharpstandard/standard/portability-issues.md - - name: Standard library + - name: C. Standard library href: ../../../_csharpstandard/standard/standard-library.md - - name: Documentation comments + - name: D. Documentation comments href: ../../../_csharpstandard/standard/documentation-comments.md - - name: Bibliography + - name: E. Bibliography href: ../../../_csharpstandard/standard/bibliography.md - name: Feature specifications items: From 6a5797ff5b6ea804fdd3bbdfca0a8a8e1657ce67 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Fri, 10 Apr 2026 18:20:23 -0400 Subject: [PATCH 5/6] Fix spec links --- .../csharp/language-reference/operators/arithmetic-operators.md | 2 +- .../language-reference/operators/bitwise-and-shift-operators.md | 2 +- .../language-reference/operators/boolean-logical-operators.md | 2 +- .../language-reference/operators/null-coalescing-operator.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/csharp/language-reference/operators/arithmetic-operators.md b/docs/csharp/language-reference/operators/arithmetic-operators.md index e762f1c74315e..b2c57e1538f9d 100644 --- a/docs/csharp/language-reference/operators/arithmetic-operators.md +++ b/docs/csharp/language-reference/operators/arithmetic-operators.md @@ -294,7 +294,7 @@ For more information, see the following sections of the [C# language specificati - [Remainder operator](~/_csharpstandard/standard/expressions.md#12134-remainder-operator) - [Addition operator](~/_csharpstandard/standard/expressions.md#12135-addition-operator) - [Subtraction operator](~/_csharpstandard/standard/expressions.md#12136-subtraction-operator) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12245-compound-assignment) - [The checked and unchecked operators](~/_csharpstandard/standard/expressions.md#12820-the-checked-and-unchecked-operators) - [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) - [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) diff --git a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md index a88003f1fc897..1b18ea4e478d9 100644 --- a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md +++ b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md @@ -199,7 +199,7 @@ For more information, see the following sections of the [C# language specificati - [Bitwise complement operator](~/_csharpstandard/standard/expressions.md#1295-bitwise-complement-operator) - [Shift operators](~/_csharpstandard/standard/expressions.md#1214-shift-operators) - [Logical operators](~/_csharpstandard/standard/expressions.md#1216-logical-operators) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12245-compound-assignment) - [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) - [Relaxed shift requirements](~/_csharplang/proposals/csharp-11.0/relaxing_shift_operator_requirements.md) - [Logical right-shift operator](~/_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md) diff --git a/docs/csharp/language-reference/operators/boolean-logical-operators.md b/docs/csharp/language-reference/operators/boolean-logical-operators.md index 31b5c8650c700..633aac56a0926 100644 --- a/docs/csharp/language-reference/operators/boolean-logical-operators.md +++ b/docs/csharp/language-reference/operators/boolean-logical-operators.md @@ -195,7 +195,7 @@ For more information, see the following sections of the [C# language specificati - [Logical negation operator](~/_csharpstandard/standard/expressions.md#1294-logical-negation-operator) - [Logical operators](~/_csharpstandard/standard/expressions.md#1216-logical-operators) - [Conditional logical operators](~/_csharpstandard/standard/expressions.md#1217-conditional-logical-operators) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12245-compound-assignment) - [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) ## See also diff --git a/docs/csharp/language-reference/operators/null-coalescing-operator.md b/docs/csharp/language-reference/operators/null-coalescing-operator.md index bbfcd02f3ee73..e3dd1c648d671 100644 --- a/docs/csharp/language-reference/operators/null-coalescing-operator.md +++ b/docs/csharp/language-reference/operators/null-coalescing-operator.md @@ -82,7 +82,7 @@ You can't overload the `??` and `??=` operators. For more information about the `??` operator, see [The null coalescing operator](~/_csharpstandard/standard/expressions.md#1218-the-null-coalescing-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). -For more information about the `??=` operator, see the [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment) section of the C# language specification. +For more information about the `??=` operator, see the [Compound assignment](~/_csharpstandard/standard/expressions.md#12245-compound-assignment) section of the C# language specification. ## See also From 187cc922e7e547773d1408b2a5b365ce37c0ebed Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Sun, 12 Apr 2026 14:22:39 -0400 Subject: [PATCH 6/6] Replace links Replace all links to the C# 9 feature specs with the corresponding location in the C# 9 alpha draft of the C# standard. --- .openpublishing.redirection.csharp.json | 2 +- .../sdk/6.0/csharp-template-code.md | 2 +- .../program-structure/top-level-statements.md | 2 +- .../builtin-types/integral-numeric-types.md | 2 +- .../builtin-types/record.md | 6 ++--- .../compiler-messages/entry-point-errors.md | 2 +- .../record-declaration-errors.md | 8 +++---- .../language-reference/keywords/override.md | 2 +- .../operators/boolean-logical-operators.md | 2 +- .../operators/conditional-operator.md | 2 +- .../operators/equality-operators.md | 2 +- .../operators/lambda-expressions.md | 4 ++-- .../operators/new-operator.md | 2 +- .../operators/null-forgiving.md | 2 +- .../operators/operator-overloading.md | 2 +- .../language-reference/operators/patterns.md | 8 +++---- .../operators/true-false-operators.md | 2 +- .../operators/with-expression.md | 6 ++--- .../statements/iteration-statements.md | 2 +- docs/csharp/language-reference/unsafe-code.md | 2 +- docs/csharp/nullable-references.md | 2 +- .../partial-classes-and-methods.md | 2 +- .../static-constructors.md | 2 +- .../programming-guide/delegates/index.md | 2 +- .../constraints-on-type-parameters.md | 2 +- docs/csharp/specification/overview.md | 8 +++---- docs/csharp/tutorials/records.md | 2 +- .../whats-new/csharp-version-history.md | 24 +++++++++---------- .../code-analysis/style-rules/ide0090.md | 4 ++-- .../code-analysis/style-rules/ide0320.md | 2 +- 30 files changed, 56 insertions(+), 56 deletions(-) diff --git a/.openpublishing.redirection.csharp.json b/.openpublishing.redirection.csharp.json index 292f93002c94f..9a847bfc1a699 100644 --- a/.openpublishing.redirection.csharp.json +++ b/.openpublishing.redirection.csharp.json @@ -1851,7 +1851,7 @@ }, { "source_path_from_root": "/docs/csharp/language-reference/proposals/csharp-9.0/index.md", - "redirect_url": "/dotnet/csharp/language-reference/proposals/csharp-9.0/records" + "redirect_url": "/dotnet/csharp/language-reference/language-specification/classes#1516-synthesized-record-class-members" }, { "source_path_from_root": "/docs/csharp/language-reference/proposals/csharp-10.0/index.md", diff --git a/docs/core/compatibility/sdk/6.0/csharp-template-code.md b/docs/core/compatibility/sdk/6.0/csharp-template-code.md index 8c84ec0e1485d..6bdfcbc01bada 100644 --- a/docs/core/compatibility/sdk/6.0/csharp-template-code.md +++ b/docs/core/compatibility/sdk/6.0/csharp-template-code.md @@ -10,7 +10,7 @@ Starting in .NET 6, the project templates that ship with the .NET SDK use the la - [Top-level statements](../../../../csharp/fundamentals/program-structure/top-level-statements.md) - [Global using directives](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-10.0/GlobalUsingDirective.md) - [File-scoped namespaces](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-10.0/file-scoped-namespaces.md) -- [Target-typed new expressions](/dotnet/csharp/language-reference/proposals/csharp-9.0/target-typed-new) +- [Target-typed new expressions](/dotnet/csharp/language-reference/language-specification/expressions#128172-object-creation-expressions) - [Nullable reference types](../../../../csharp/nullable-references.md) - [Async Main return values](../../../../csharp/fundamentals/program-structure/main-command-line.md#main-return-values) diff --git a/docs/csharp/fundamentals/program-structure/top-level-statements.md b/docs/csharp/fundamentals/program-structure/top-level-statements.md index 554cdd20abd26..9b5c969bd4d68 100644 --- a/docs/csharp/fundamentals/program-structure/top-level-statements.md +++ b/docs/csharp/fundamentals/program-structure/top-level-statements.md @@ -73,4 +73,4 @@ To return an exit code when the application ends, use the `return` statement. Th - [Main() and command-line arguments](main-command-line.md) - [General structure of a C# program](index.md) -- [Feature specification - Top-level statements](~/_csharplang/proposals/csharp-9.0/top-level-statements.md) +- [Feature specification - Top-level statements](~/_csharpstandard/standard/basic-concepts.md#713-using-top-level-statements) diff --git a/docs/csharp/language-reference/builtin-types/integral-numeric-types.md b/docs/csharp/language-reference/builtin-types/integral-numeric-types.md index 2be81ea315ecd..b7be44c06a99e 100644 --- a/docs/csharp/language-reference/builtin-types/integral-numeric-types.md +++ b/docs/csharp/language-reference/builtin-types/integral-numeric-types.md @@ -155,7 +155,7 @@ For more information, see the following sections of the [C# language specificati - [Integral types](~/_csharpstandard/standard/types.md#836-integral-types) - [Integer literals](~/_csharpstandard/standard/lexical-structure.md#6453-integer-literals) -- [Native sized integral types](~/_csharplang/proposals/csharp-9.0/native-integers.md) +- [Native sized integral types](~/_csharpstandard/standard/types.md#836-integral-types) - [Numeric `IntPtr` and `UIntPtr`](~/_csharplang/proposals/csharp-11.0/numeric-intptr.md) ## See also diff --git a/docs/csharp/language-reference/builtin-types/record.md b/docs/csharp/language-reference/builtin-types/record.md index 1a7243733f96a..d767294c11b30 100644 --- a/docs/csharp/language-reference/builtin-types/record.md +++ b/docs/csharp/language-reference/builtin-types/record.md @@ -259,9 +259,9 @@ For more information, see the [Classes](~/_csharpstandard/standard/classes.md) s For more information about these features, see the following feature proposal notes: -- [Records](~/_csharplang/proposals/csharp-9.0/records.md) -- [Init-only setters](~/_csharplang/proposals/csharp-9.0/init.md) -- [Covariant returns](~/_csharplang/proposals/csharp-9.0/covariant-returns.md) +- [Records](~/_csharpstandard/standard/classes.md#1516-synthesized-record-class-members) +- [Init-only setters](~/_csharpstandard/standard/classes.md#15733-init-accessors) +- [Covariant returns](~/_csharpstandard/standard/classes.md#1565-override-methods) ## See also diff --git a/docs/csharp/language-reference/compiler-messages/entry-point-errors.md b/docs/csharp/language-reference/compiler-messages/entry-point-errors.md index a0a301a224d84..54ca24412974c 100644 --- a/docs/csharp/language-reference/compiler-messages/entry-point-errors.md +++ b/docs/csharp/language-reference/compiler-messages/entry-point-errors.md @@ -124,7 +124,7 @@ To correct these errors, ensure the `StartupObject` option references a valid ty - **CS8805**: *Program using top-level statements must be an executable.* - **CS8937**: *At least one top-level statement must be non-empty.* -[Top-level statements](../../fundamentals/program-structure/top-level-statements.md) replace the explicit `Main` method as the program's entry point. For more information, see [Top-level statements](../../fundamentals/program-structure/top-level-statements.md) in the C# programming guide and the [top-level statements](~/_csharplang/proposals/csharp-9.0/top-level-statements.md) feature specification. +[Top-level statements](../../fundamentals/program-structure/top-level-statements.md) replace the explicit `Main` method as the program's entry point. For more information, see [Top-level statements](../../fundamentals/program-structure/top-level-statements.md) in the C# programming guide and the [top-level statements](~/_csharpstandard/standard/basic-concepts.md#713-using-top-level-statements) section of the C# language specification. To correct these errors, ensure your use of top-level statements follows these rules: diff --git a/docs/csharp/language-reference/compiler-messages/record-declaration-errors.md b/docs/csharp/language-reference/compiler-messages/record-declaration-errors.md index 4281d35f53bff..e17705f656691 100644 --- a/docs/csharp/language-reference/compiler-messages/record-declaration-errors.md +++ b/docs/csharp/language-reference/compiler-messages/record-declaration-errors.md @@ -78,7 +78,7 @@ In addition, this article covers the following warning: - **CS8877**: *Record member may not be static.* - **CS8879**: *Record member must be private.* -When you explicitly declare a member that the compiler would otherwise synthesize for a [record type](../builtin-types/record.md), your declaration must match the expected signature, accessibility, and modifiers. For the complete rules, see the [feature specification for records](~/_csharplang/proposals/csharp-9.0/records.md). +When you explicitly declare a member that the compiler would otherwise synthesize for a [record type](../builtin-types/record.md), your declaration must match the expected signature, accessibility, and modifiers. For the complete rules, see the [records specification](~/_csharpstandard/standard/classes.md#1516-synthesized-record-class-members) in the C# language specification. To correct these errors, apply the following changes to your explicitly declared record members: @@ -97,7 +97,7 @@ To correct these errors, apply the following changes to your explicitly declared - **CS8908**: *The type may not be used for a field of a record.* - **CS8913**: *The positional member found corresponding to this parameter is hidden.* -When you declare a [positional record](../builtin-types/record.md#positional-syntax-for-property-and-field-definition), the compiler synthesizes properties that correspond to each positional parameter. These diagnostics indicate that your explicit declarations conflict with those synthesized properties. For the complete rules, see the [feature specification for records](~/_csharplang/proposals/csharp-9.0/records.md). +When you declare a [positional record](../builtin-types/record.md#positional-syntax-for-property-and-field-definition), the compiler synthesizes properties that correspond to each positional parameter. These diagnostics indicate that your explicit declarations conflict with those synthesized properties. For the complete rules, see the [records specification](~/_csharpstandard/standard/classes.md#1516-synthesized-record-class-members) in the C# language specification. To correct these errors, apply the following changes to your positional record declarations: @@ -123,7 +123,7 @@ To correct these errors, apply the following changes: - **CS8864**: *Records may only inherit from object or another record* - **CS8865**: *Only records may inherit from records.* -[Record class types](../builtin-types/record.md) follow specific [inheritance](../builtin-types/record.md#equality-in-inheritance-hierarchies) rules. For the complete rules, see the [feature specification for records](~/_csharplang/proposals/csharp-9.0/records.md). +[Record class types](../builtin-types/record.md) follow specific [inheritance](../builtin-types/record.md#equality-in-inheritance-hierarchies) rules. For the complete rules, see the [records specification](~/_csharpstandard/standard/classes.md#1516-synthesized-record-class-members) in the C# language specification. To correct these errors, apply the following changes: @@ -135,7 +135,7 @@ To correct these errors, apply the following changes: - **CS8859**: *Members named 'Clone' are disallowed in records.* - **CS8860**: *Types and aliases should not be named 'record'.* -The compiler reserves certain names for use with [record types](../builtin-types/record.md). For the complete rules, see the [feature specification for records](~/_csharplang/proposals/csharp-9.0/records.md). +The compiler reserves certain names for use with [record types](../builtin-types/record.md). For the complete rules, see the [records specification](~/_csharpstandard/standard/classes.md#1516-synthesized-record-class-members) in the C# language specification. To correct these errors, apply the following changes: diff --git a/docs/csharp/language-reference/keywords/override.md b/docs/csharp/language-reference/keywords/override.md index 6f5ab6b4a4cc7..7040301815ab5 100644 --- a/docs/csharp/language-reference/keywords/override.md +++ b/docs/csharp/language-reference/keywords/override.md @@ -40,7 +40,7 @@ This example defines a base class named `Employee` and a derived class named `Sa For more information, see the [Override methods](~/_csharpstandard/standard/classes.md#1565-override-methods) section of the [C# language specification](~/_csharpstandard/standard/README.md). -For more information about covariant return types, see the [feature proposal note](~/_csharplang/proposals/csharp-9.0/covariant-returns.md). +For more information about covariant return types, see [Covariant return types](~/_csharpstandard/standard/classes.md#1565-override-methods) in the C# language specification. ## See also diff --git a/docs/csharp/language-reference/operators/boolean-logical-operators.md b/docs/csharp/language-reference/operators/boolean-logical-operators.md index 633aac56a0926..234b12ab0a330 100644 --- a/docs/csharp/language-reference/operators/boolean-logical-operators.md +++ b/docs/csharp/language-reference/operators/boolean-logical-operators.md @@ -186,7 +186,7 @@ For the complete list of C# operators ordered by precedence level, see the [Oper A user-defined type can [overload](operator-overloading.md) the `!`, `&`, `|`, and `^` operators. When a binary operator is overloaded, the corresponding compound assignment operator is also implicitly overloaded. Beginning with C# 14, a user-defined type can explicitly overload the compound assignment operators to provide a more efficient implementation. Typically, a type overloads these operators because the value can be updated in place, rather than allocating a new instance to hold the result of the binary operation. If a type doesn't provide an explicit overload, the compiler generates the implicit overload. -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). +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). ## C# language specification diff --git a/docs/csharp/language-reference/operators/conditional-operator.md b/docs/csharp/language-reference/operators/conditional-operator.md index 6d594006b76c0..9cbac3bdf5b05 100644 --- a/docs/csharp/language-reference/operators/conditional-operator.md +++ b/docs/csharp/language-reference/operators/conditional-operator.md @@ -85,7 +85,7 @@ For more information, see the [Conditional operator](~/_csharpstandard/standard/ Specifications for newer features are: -- [Target-typed conditional expression](~/_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md) +- [Target-typed conditional expression](~/_csharpstandard/standard/expressions.md#1221-conditional-operator) ## See also diff --git a/docs/csharp/language-reference/operators/equality-operators.md b/docs/csharp/language-reference/operators/equality-operators.md index 454d54ea3dfc2..8426075434cdd 100644 --- a/docs/csharp/language-reference/operators/equality-operators.md +++ b/docs/csharp/language-reference/operators/equality-operators.md @@ -106,7 +106,7 @@ public virtual bool Equals(T? other); 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). +For more information about equality of record types, see the [Equality members](~/_csharpstandard/standard/classes.md#15162-equality-members) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/lambda-expressions.md b/docs/csharp/language-reference/operators/lambda-expressions.md index 4d5517c426207..3fc36a2ee772f 100644 --- a/docs/csharp/language-reference/operators/lambda-expressions.md +++ b/docs/csharp/language-reference/operators/lambda-expressions.md @@ -331,8 +331,8 @@ For more information, see the [Anonymous function expressions](~/_csharpstandard 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 discard parameters](~/_csharpstandard/standard/expressions.md#12222-anonymous-function-signatures) +- [Static anonymous functions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) - [Lambda improvements](~/_csharplang/proposals/csharp-10.0/lambda-improvements.md) ## See also diff --git a/docs/csharp/language-reference/operators/new-operator.md b/docs/csharp/language-reference/operators/new-operator.md index f45263e41ff90..c9cd0f8c2eaaa 100644 --- a/docs/csharp/language-reference/operators/new-operator.md +++ b/docs/csharp/language-reference/operators/new-operator.md @@ -65,7 +65,7 @@ A user-defined type can't overload the `new` operator. For more information, see [The new operator](~/_csharpstandard/standard/expressions.md#12817-the-new-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). -For more information about a target-typed `new` expression, see the [feature proposal note](~/_csharplang/proposals/csharp-9.0/target-typed-new.md). +For more information about a target-typed `new` expression, see the [Object creation expressions](~/_csharpstandard/standard/expressions.md#128172-object-creation-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/null-forgiving.md b/docs/csharp/language-reference/operators/null-forgiving.md index 988dba7f70825..0753dee393434 100644 --- a/docs/csharp/language-reference/operators/null-forgiving.md +++ b/docs/csharp/language-reference/operators/null-forgiving.md @@ -42,7 +42,7 @@ In the preceding example, you don't need to use the null-forgiving operator beca ## C# language specification -For more information, see [The null-forgiving operator](~/_csharplang/proposals/csharp-9.0/nullable-reference-types-specification.md#the-null-forgiving-operator) section of the [draft of the nullable reference types specification](~/_csharplang/proposals/csharp-9.0/nullable-reference-types-specification.md). +For more information, see [The null-forgiving operator](~/_csharpstandard/standard/expressions.md#1289-null-forgiving-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/operator-overloading.md b/docs/csharp/language-reference/operators/operator-overloading.md index 0d63decae4c66..c82eb1ed2601f 100644 --- a/docs/csharp/language-reference/operators/operator-overloading.md +++ b/docs/csharp/language-reference/operators/operator-overloading.md @@ -61,7 +61,7 @@ The following table shows the operators that can't be overloaded: | Operators | Alternatives | | :---------: | --------------- | -|[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [x || y](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 [|](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 ).| +|[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [x || y](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 [|](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).| |[a[i]](member-access-operators.md#indexer-operator-), [`a?[i]`](member-access-operators.md#null-conditional-operators--and-)|Define an [indexer](../../programming-guide/indexers/index.md).| |[`(T)x`](type-testing-and-cast.md#cast-expression)|Define custom type conversions performed by a cast expression. For more information, see [User-defined conversion operators](user-defined-conversion-operators.md).| |[`^x`](member-access-operators.md#index-from-end-operator-), [`x = y`](assignment-operator.md), [`x.y`](member-access-operators.md#member-access-expression-), [`x?.y`](member-access-operators.md#null-conditional-operators--and-), [`c ? t : f`](conditional-operator.md), [`x ?? y`](null-coalescing-operator.md), [`??= y`](null-coalescing-operator.md),
[`x..y`](member-access-operators.md#range-operator-), [`x->y`](pointer-related-operators.md#pointer-member-access-operator--), [`=>`](lambda-operator.md), [`f(x)`](member-access-operators.md#invocation-expression-), [`as`](type-testing-and-cast.md#the-as-operator), [`await`](await.md), [`checked`](../statements/checked-and-unchecked.md), [`unchecked`](../statements/checked-and-unchecked.md), [`default`](default.md), [`delegate`](delegate-operator.md), [`is`](type-testing-and-cast.md#the-is-operator), [`nameof`](nameof.md), [`new`](new-operator.md),
[`sizeof`](sizeof.md), [`stackalloc`](stackalloc.md), [`switch`](switch-expression.md), [`typeof`](type-testing-and-cast.md#the-typeof-operator), [`with`](with-expression.md)|None.| diff --git a/docs/csharp/language-reference/operators/patterns.md b/docs/csharp/language-reference/operators/patterns.md index ac5f6980f1ad0..03d991245034f 100644 --- a/docs/csharp/language-reference/operators/patterns.md +++ b/docs/csharp/language-reference/operators/patterns.md @@ -77,7 +77,7 @@ To check for non-null, use a [negated](#logical-patterns) `null` [constant patte :::code language="csharp" source="snippets/patterns/DeclarationAndTypePatterns.cs" id="NonNullCheck"::: -For more information, see the [Declaration pattern](~/_csharpstandard/standard/patterns.md#1122-declaration-pattern) and [Type pattern](~/_csharplang/proposals/csharp-9.0/patterns3.md#type-patterns) sections of the feature proposal notes. +For more information, see the [Declaration pattern](~/_csharpstandard/standard/patterns.md#1122-declaration-pattern) and [Type pattern](~/_csharpstandard/standard/patterns.md#1128-type-pattern) sections of the C# language specification. ## Constant pattern @@ -123,7 +123,7 @@ To check if an expression result is in a certain range, match it against a [conj If an expression result is `null` or fails to convert to the type of a constant by using a nullable or unboxing conversion, a relational pattern doesn't match the expression. -For more information, see the [Relational patterns](~/_csharplang/proposals/csharp-9.0/patterns3.md#relational-patterns) section of the feature proposal note. +For more information, see the [Relational patterns](~/_csharpstandard/standard/patterns.md#1129-relational-pattern) section of the C# language specification. ## Logical patterns @@ -170,7 +170,7 @@ Adding parentheses becomes more important as your patterns become more complicat > [!NOTE] > The order in which the compiler checks patterns that have the same binding order is undefined. At run time, the compiler can check the right-hand nested patterns of multiple `or` patterns and multiple `and` patterns first. -For more information, see the [Pattern combinators](~/_csharplang/proposals/csharp-9.0/patterns3.md#pattern-combinators) section of the feature proposal note. +For more information, see the [Pattern combinators](~/_csharpstandard/standard/patterns.md#11210-logical-pattern) section of the C# language specification. ## Property pattern @@ -330,7 +330,7 @@ For more information, see the [Patterns and pattern matching](~/_csharpstandard/ For information about features added in C# 9 and later versions, see the following feature proposal notes: -- [Pattern-matching updates](~/_csharplang/proposals/csharp-9.0/patterns3.md) +- [Pattern matching](~/_csharpstandard/standard/patterns.md#112-pattern-forms) - [Extended property patterns](~/_csharplang/proposals/csharp-10.0/extended-property-patterns.md) - [List patterns](~/_csharplang/proposals/csharp-11.0/list-patterns.md) - [Pattern match `Span` on string literal](~/_csharplang/proposals/csharp-11.0/pattern-match-span-of-char-on-string.md) diff --git a/docs/csharp/language-reference/operators/true-false-operators.md b/docs/csharp/language-reference/operators/true-false-operators.md index a1f661e53707f..8a5cd13cf6a18 100644 --- a/docs/csharp/language-reference/operators/true-false-operators.md +++ b/docs/csharp/language-reference/operators/true-false-operators.md @@ -28,7 +28,7 @@ A type with the defined `true` operator can be the type of a result of a control ## 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#12173-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). ## Example diff --git a/docs/csharp/language-reference/operators/with-expression.md b/docs/csharp/language-reference/operators/with-expression.md index 57dc3f6b62d2d..9ab652122fe05 100644 --- a/docs/csharp/language-reference/operators/with-expression.md +++ b/docs/csharp/language-reference/operators/with-expression.md @@ -34,10 +34,10 @@ You can't customize the copy semantics for structure types. ## C# language specification -For more information, see the following sections of the [records feature proposal note](~/_csharplang/proposals/csharp-9.0/records.md): +For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [`with` expression](~/_csharplang/proposals/csharp-9.0/records.md#with-expression) -- [Copy and Clone members](~/_csharplang/proposals/csharp-9.0/records.md#copy-and-clone-members) +- [`with` expression](~/_csharpstandard/standard/expressions.md#1210-with-expressions) +- [Copy and Clone members](~/_csharpstandard/standard/classes.md#15163-copy-and-clone-members) ## See also diff --git a/docs/csharp/language-reference/statements/iteration-statements.md b/docs/csharp/language-reference/statements/iteration-statements.md index 6d17025fb3246..1c32d7030dc32 100644 --- a/docs/csharp/language-reference/statements/iteration-statements.md +++ b/docs/csharp/language-reference/statements/iteration-statements.md @@ -156,7 +156,7 @@ For more information, see the following sections of the [C# language specificati - [The `foreach` statement](~/_csharpstandard/standard/statements.md#1395-the-foreach-statement) - [The `do` statement](~/_csharpstandard/standard/statements.md#1393-the-do-statement) - [The `while` statement](~/_csharpstandard/standard/statements.md#1392-the-while-statement) -- [Extension `GetEnumerator` support for `foreach` loops](~/_csharplang/proposals/csharp-9.0/extension-getenumerator.md) +- [Extension `GetEnumerator` support for `foreach` loops](~/_csharpstandard/standard/statements.md#1395-the-foreach-statement) ## See also diff --git a/docs/csharp/language-reference/unsafe-code.md b/docs/csharp/language-reference/unsafe-code.md index 089329f5ae0fa..201b19368a789 100644 --- a/docs/csharp/language-reference/unsafe-code.md +++ b/docs/csharp/language-reference/unsafe-code.md @@ -191,7 +191,7 @@ You can specify the calling convention for a `delegate*` by using the keywords ` :::code language="csharp" source="snippets/unsafe-code/FunctionPointers.cs" ID="UnmanagedFunctionPointers"::: -You can learn more about function pointers in the [Function pointer](~/_csharplang/proposals/csharp-9.0/function-pointers.md) feature spec. +You can learn more about function pointers in the [Function pointers](~/_csharpstandard/standard/unsafe-code.md#2433-function-pointers) section of the C# language specification. ## C# language specification diff --git a/docs/csharp/nullable-references.md b/docs/csharp/nullable-references.md index a8dec47e94477..ba5794899d1e1 100644 --- a/docs/csharp/nullable-references.md +++ b/docs/csharp/nullable-references.md @@ -426,7 +426,7 @@ In the preceding example, the > :::code language="csharp" source="./snippets/static-constructors/Program.cs" id="Singleton"::: -A [module initializer](../../language-reference/attributes/general.md#moduleinitializer-attribute) can be an alternative to a static constructor. For more information, see the [specification for module initializers](~/_csharplang/proposals/csharp-9.0/module-initializers.md). +A [module initializer](../../language-reference/attributes/general.md#moduleinitializer-attribute) can be an alternative to a static constructor. For more information, see the [specification for module initializers](~/_csharpstandard/standard/attributes.md#2359-the-moduleinitializer-attribute). ## Remarks diff --git a/docs/csharp/programming-guide/delegates/index.md b/docs/csharp/programming-guide/delegates/index.md index b4b880996d85a..79163cd70256c 100644 --- a/docs/csharp/programming-guide/delegates/index.md +++ b/docs/csharp/programming-guide/delegates/index.md @@ -23,7 +23,7 @@ You can assign any method from any accessible class or struct that matches the d The ability to refer to a method as a parameter makes delegates ideal for defining callback methods. You can write a method that compares two objects in your application. The method can then be used in a delegate for a sort algorithm. Because the comparison code is separate from the library, the sort method can be more general. -[Function pointers](~/_csharplang/proposals/csharp-9.0/function-pointers.md) support similar scenarios, where you need more control over the calling convention. The code associated with a delegate is invoked by using a virtual method added to a delegate type. When you work with function pointers, you can specify different conventions. +[Function pointers](~/_csharpstandard/standard/unsafe-code.md#2433-function-pointers) support similar scenarios, where you need more control over the calling convention. The code associated with a delegate is invoked by using a virtual method added to a delegate type. When you work with function pointers, you can specify different conventions. ## Explore delegate characteristics diff --git a/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md b/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md index 2f5376ebccbe2..f7b3198629906 100644 --- a/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md +++ b/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md @@ -29,7 +29,7 @@ Constraints inform the compiler about the capabilities a type argument must have |`where T :` *\*|The type argument must be or implement the specified interface. Multiple interface constraints can be specified. The constraining interface can also be generic. In a nullable context, `T` must be a non-nullable type that implements the specified interface.| |`where T :` *\?*|The type argument must be or implement the specified interface. Multiple interface constraints can be specified. The constraining interface can also be generic. In a nullable context, `T` can be a nullable reference type, a non-nullable reference type, or a value type. `T` can't be a nullable value type.| |`where T : U`|The type argument supplied for `T` must be or derive from the argument supplied for `U`. In a nullable context, if `U` is a non-nullable reference type, `T` must be a non-nullable reference type. If `U` is a nullable reference type, `T` can be either nullable or non-nullable. | -|`where T : default`|This constraint resolves the ambiguity when you need to specify an unconstrained type parameter when you override a method or provide an explicit interface implementation. The `default` constraint implies the base method without either the `class` or `struct` constraint. For more information, see the [`default` constraint](~/_csharplang/proposals/csharp-9.0/unconstrained-type-parameter-annotations.md#default-constraint) spec proposal.| +|`where T : default`|This constraint resolves the ambiguity when you need to specify an unconstrained type parameter when you override a method or provide an explicit interface implementation. The `default` constraint implies the base method without either the `class` or `struct` constraint. For more information, see the [`default` constraint](~/_csharpstandard/standard/classes.md#1525-type-parameter-constraints) section of the C# language specification.| |`where T : allows ref struct`|This anti-constraint declares that the type argument for `T` can be a `ref struct` type. The generic type or method must obey ref safety rules for any instance of `T` because it might be a `ref struct`.| Some constraints are mutually exclusive, and some constraints must be in a specified order: diff --git a/docs/csharp/specification/overview.md b/docs/csharp/specification/overview.md index 0fa25fcdd51b4..e45e4df571d65 100644 --- a/docs/csharp/specification/overview.md +++ b/docs/csharp/specification/overview.md @@ -5,14 +5,14 @@ ms.date: 04/10/2026 --- # C# standard specification -The [C# language specification](~/_csharpstandard/standard/README.md) is the definitive source for the C# language. The [ECMA C# standard committee (TC49-TG2)](https://www.ecma-international.org/task-groups/tc49-tg2/) produces the specification. +The [C# language specification](~/_csharpstandard/standard/README.md) is the definitive source for the C# language. The [ECMA C# standard committee (TC49-TG2)](https://www.ecma-international.org/task-groups/tc49-tg2/) produces the specification. The committee is currently finalizing version 8 of the standard. -The committee is currently working on version 8 of the standard. The draft published here is a feature complete early draft of C# 9. The committee uses [Microsoft specifications](https://github.com/dotnet/csharplang/tree/main/proposals) and [language design meeting (LDM) notes](https://github.com/dotnet/csharplang/tree/main/meetings) to produce the specification. +The draft published here is a feature complete early draft of C# 9 based on the committee's initial work. The committee uses [Microsoft specifications](https://github.com/dotnet/csharplang/tree/main/proposals) and [language design meeting (LDM) notes](https://github.com/dotnet/csharplang/tree/main/meetings) to produce the specification. These early drafts haven't been reviewed or adopted by the committee yet. -This section contains an early working draft of the [C# language specification](~/_csharpstandard/standard/README.md). The committee works in the [dotnet/csharpstandard](https://github.com/dotnet/csharpstandard) repository. You can track the committee's progress and participate in the standard work there. +This section contains a working draft of the [C# language specification](~/_csharpstandard/standard/README.md). The committee works in the [dotnet/csharpstandard](https://github.com/dotnet/csharpstandard) repository. You can track the committee's progress and participate in the standard work there. > [!NOTE] -> The committee works to update the C# language specification, but it fell behind the current implementation. For specifications about current features, see [Feature specifications](feature-spec-overview.md). +> The committee works to update the C# language specification, but it fell behind the current implementation. For specifications about newer features, see [Feature specifications](feature-spec-overview.md). ## See also diff --git a/docs/csharp/tutorials/records.md b/docs/csharp/tutorials/records.md index d31c8dd6f0d1c..54986311543e4 100644 --- a/docs/csharp/tutorials/records.md +++ b/docs/csharp/tutorials/records.md @@ -155,4 +155,4 @@ This tutorial showed several aspects of records. Records provide concise syntax Records add another way to define types. You use `class` definitions to create object-oriented hierarchies that focus on the responsibilities and behavior of objects. You create `struct` types for data structures that store data and are small enough to copy efficiently. You create `record` types when you want value-based equality and comparison, don't want to copy values, and want to use reference variables. You create `record struct` types when you want the features of records for a type that is small enough to copy efficiently. -You can learn more about records in the [C# language reference article for the record type](../language-reference/builtin-types/record.md) and the [proposed record type specification](~/_csharplang/proposals/csharp-9.0/records.md) and [record struct specification](~/_csharplang/proposals/csharp-10.0/record-structs.md). +You can learn more about records in the [C# language reference article for the record type](../language-reference/builtin-types/record.md) and the [record type specification](~/_csharpstandard/standard/classes.md#1516-synthesized-record-class-members) and [record struct specification](~/_csharplang/proposals/csharp-10.0/record-structs.md). diff --git a/docs/csharp/whats-new/csharp-version-history.md b/docs/csharp/whats-new/csharp-version-history.md index ef8cf830c4162..1de3de5e6c721 100644 --- a/docs/csharp/whats-new/csharp-version-history.md +++ b/docs/csharp/whats-new/csharp-version-history.md @@ -129,25 +129,25 @@ C# 9 was released with .NET 5. It's the default language version for any assembl - [Top-level statements](../fundamentals/program-structure/top-level-statements.md) - Pattern matching enhancements: [relational patterns](../language-reference/operators/patterns.md#relational-patterns) and [logical patterns](../language-reference/operators/patterns.md#logical-patterns) - [Performance and interop](#performance-and-interop) - - [Native sized integers](~/_csharplang/proposals/csharp-9.0/native-integers.md) - - [Function pointers](~/_csharplang/proposals/csharp-9.0/function-pointers.md) + - [Native sized integers](~/_csharpstandard/standard/types.md#836-integral-types) + - [Function pointers](~/_csharpstandard/standard/unsafe-code.md#2433-function-pointers) - [Suppress emitting localsinit flag](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-9.0/skip-localsinit.md) - - [Module initializers](~/_csharplang/proposals/csharp-9.0/module-initializers.md) - - [New features for partial methods](~/_csharplang/proposals/csharp-9.0/extending-partial-methods.md) + - [Module initializers](~/_csharpstandard/standard/attributes.md#2359-the-moduleinitializer-attribute) + - [New features for partial methods](~/_csharpstandard/standard/classes.md#1569-partial-methods) - [Fit and finish features](#fit-and-finish-features) - - [Target-typed `new` expressions](~/_csharplang/proposals/csharp-9.0/target-typed-new.md) - - [`static` anonymous functions](~/_csharplang/proposals/csharp-9.0/static-anonymous-functions.md) - - [Target-typed conditional expressions](~/_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md) - - [Covariant return types](~/_csharplang/proposals/csharp-9.0/covariant-returns.md) - - [Extension `GetEnumerator` support for `foreach` loops](~/_csharplang/proposals/csharp-9.0/extension-getenumerator.md) - - [Lambda discard parameters](~/_csharplang/proposals/csharp-9.0/lambda-discard-parameters.md) - - [Attributes on local functions](~/_csharplang/proposals/csharp-9.0/local-function-attributes.md) + - [Target-typed `new` expressions](~/_csharpstandard/standard/expressions.md#128172-object-creation-expressions) + - [`static` anonymous functions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) + - [Target-typed conditional expressions](~/_csharpstandard/standard/expressions.md#1221-conditional-operator) + - [Covariant return types](~/_csharpstandard/standard/classes.md#1565-override-methods) + - [Extension `GetEnumerator` support for `foreach` loops](~/_csharpstandard/standard/statements.md#1395-the-foreach-statement) + - [Lambda discard parameters](~/_csharpstandard/standard/expressions.md#12222-anonymous-function-signatures) + - [Attributes on local functions](~/_csharpstandard/standard/statements.md#1364-local-function-declarations) C# 9 continues three of the themes from previous releases: removing ceremony, separating data from algorithms, and providing more patterns in more places. [Top level statements](../fundamentals/program-structure/top-level-statements.md) means your main program is simpler to read. There's less need for ceremony: a namespace, a `Program` class, and `static void Main()` are all unnecessary. -The introduction of [`records`](../language-reference/builtin-types/record.md) provides a concise syntax for reference types that follow value semantics for equality. You use these types to define data containers that typically define minimal behavior. [Init-only setters](../language-reference/keywords/init.md) provide the capability for nondestructive mutation (`with` expressions) in records. C# 9 also adds [covariant return types](~/_csharplang/proposals/csharp-9.0/covariant-returns.md) so that derived records can override virtual methods and return a type derived from the base method's return type. +The introduction of [`records`](../language-reference/builtin-types/record.md) provides a concise syntax for reference types that follow value semantics for equality. You use these types to define data containers that typically define minimal behavior. [Init-only setters](../language-reference/keywords/init.md) provide the capability for nondestructive mutation (`with` expressions) in records. C# 9 also adds [covariant return types](~/_csharpstandard/standard/classes.md#1565-override-methods) so that derived records can override virtual methods and return a type derived from the base method's return type. The [pattern matching](../fundamentals/functional/pattern-matching.md) capabilities expanded in several ways. Numeric types now support *range patterns*. Patterns can be combined using `and`, `or`, and `not` patterns. Parentheses can be added to clarify more complex patterns: diff --git a/docs/fundamentals/code-analysis/style-rules/ide0090.md b/docs/fundamentals/code-analysis/style-rules/ide0090.md index 0ad2b0754b7cd..c788a04f49070 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0090.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0090.md @@ -26,7 +26,7 @@ dev_langs: ## Overview -This style rule concerns the use of C# 9.0 [target-typed new](/dotnet/csharp/language-reference/proposals/csharp-9.0/target-typed-new) expressions when the created type is apparent. +This style rule concerns the use of C# 9.0 [target-typed new](/dotnet/csharp/language-reference/language-specification/expressions#128172-object-creation-expressions) expressions when the created type is apparent. ## Options @@ -79,6 +79,6 @@ For more information, see [How to suppress code analysis warnings](../suppress-w ## See also -- [Target-typed new expressions](/dotnet/csharp/language-reference/proposals/csharp-9.0/target-typed-new) +- [Target-typed new expressions](/dotnet/csharp/language-reference/language-specification/expressions#128172-object-creation-expressions) - [Code style language rules](language-rules.md) - [Code style rules reference](index.md) diff --git a/docs/fundamentals/code-analysis/style-rules/ide0320.md b/docs/fundamentals/code-analysis/style-rules/ide0320.md index f6bf17e8f57d6..3b5096182bfd0 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0320.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0320.md @@ -83,4 +83,4 @@ For more information, see [How to suppress code analysis warnings](../suppress-w ## See also -- [Static anonymous functions](/dotnet/csharp/language-reference/proposals/csharp-9.0/static-anonymous-functions) +- [Static anonymous functions](/dotnet/csharp/language-reference/language-specification/expressions#1222-anonymous-function-expressions)