diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 9cce24d2479b1..3c90d2b9ef3fa 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": "alpha-v10", + "branch": "v11-alpha", "include_in_build": true, "branch_mapping": {} }, diff --git a/.openpublishing.redirection.csharp.json b/.openpublishing.redirection.csharp.json index 7a7f642051219..80664267147fe 100644 --- a/.openpublishing.redirection.csharp.json +++ b/.openpublishing.redirection.csharp.json @@ -430,7 +430,7 @@ }, { "source_path_from_root": "/redirections/proposals/csharp-10.0/generic-attributes.md", - "redirect_url": "/dotnet/csharp/language-reference/proposals/csharp-11.0/generic-attributes" + "redirect_url": "/dotnet/csharp/language-reference/language-specification/attributes#232-attribute-classes" }, { "source_path_from_root": "/docs/csharp/async.md", @@ -1983,7 +1983,7 @@ }, { "source_path_from_root": "/docs/csharp/language-reference/proposals/csharp-11.0/index.md", - "redirect_url": "/dotnet/csharp/language-reference/proposals/csharp-11.0/static-abstracts-in-interfaces" + "redirect_url": "/dotnet/csharp/language-reference/language-specification/interfaces#1947-interface-operators" }, { "source_path_from_root": "/docs/csharp/language-reference/specifications.md", diff --git a/docfx.json b/docfx.json index a2e90bbe00cba..7c9ce03c942b8 100644 --- a/docfx.json +++ b/docfx.json @@ -49,7 +49,6 @@ }, { "files": [ - "csharp-11.0/*.md", "csharp-12.0/*.md", "csharp-13.0/*.md", "csharp-14.0/*.md", @@ -505,7 +504,6 @@ }, "ms.date": { "_csharpstandard/standard/*.md": "09/12/2025", - "_csharplang/proposals/csharp-11.0/*.md": "09/30/2022", "_csharplang/proposals/csharp-12.0/*.md": "08/15/2023", "_csharplang/proposals/csharp-13.0/*.md": "10/31/2024", "_csharplang/proposals/csharp-14.0/*.md": "08/06/2025", @@ -618,22 +616,6 @@ "_csharpstandard/standard/standard-library.md": "Standard library", "_csharpstandard/standard/documentation-comments.md": "Documentation comments", "_csharpstandard/standard/Bibliography.md": "Bibliography", - "_csharplang/proposals/csharp-11.0/generic-attributes.md": "Generic attributes", - "_csharplang/proposals/csharp-11.0/auto-default-structs.md": "Auto-default struct", - "_csharplang/proposals/csharp-11.0/checked-user-defined-operators.md": "Checked user defined operators", - "_csharplang/proposals/csharp-11.0/extended-nameof-scope.md": "Extended nameof parameter scope", - "_csharplang/proposals/csharp-11.0/file-local-types.md": "File local types", - "_csharplang/proposals/csharp-11.0/list-patterns.md": "List patterns", - "_csharplang/proposals/csharp-11.0/low-level-struct-improvements.md": "Low level struct improvements", - "_csharplang/proposals/csharp-11.0/new-line-in-interpolation.md": "Interpolated string expression newline", - "_csharplang/proposals/csharp-11.0/numeric-intptr.md": "Numeric IntPtr", - "_csharplang/proposals/csharp-11.0/pattern-match-span-of-char-on-string.md": "Pattern match Span", - "_csharplang/proposals/csharp-11.0/raw-string-literal.md": "Raw string literal", - "_csharplang/proposals/csharp-11.0/relaxing_shift_operator_requirements.md": "Relaxed right shift requirement", - "_csharplang/proposals/csharp-11.0/required-members.md": "Required members", - "_csharplang/proposals/csharp-11.0/static-abstracts-in-interfaces.md": "Static abstract methods in interfaces", - "_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md": "Unsigned right shift operator", - "_csharplang/proposals/csharp-11.0/utf8-string-literals.md": "UTF-8 string literals", "_csharplang/proposals/csharp-12.0/primary-constructors.md": "Primary constructors", "_csharplang/proposals/csharp-12.0/using-alias-types.md": "Alias any type", "_csharplang/proposals/csharp-12.0/lambda-method-group-defaults.md": "Optional and parameter array parameters for lambdas and method groups", @@ -717,22 +699,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-11.0/generic-attributes.md": "This feature specification describes generic attributes, where a generic class may derive from 'System.Attribute'.", - "_csharplang/proposals/csharp-11.0/auto-default-structs.md": "This feature updates the rules for struct initialization and default values. This feature standardizes the behavior for default struct values and newly initialized structs.", - "_csharplang/proposals/csharp-11.0/checked-user-defined-operators.md": "This feature enables checked and unchecked alternatives for some operators.", - "_csharplang/proposals/csharp-11.0/extended-nameof-scope.md": "This feature enables the nameof expression to be used with parameter names in a method declaration.", - "_csharplang/proposals/csharp-11.0/file-local-types.md": "This feature allows you to create types (either structs or classes) that are visibile only in the file in which they are declared. This is primarily useful for source generators.", - "_csharplang/proposals/csharp-11.0/list-patterns.md": "This feature describes enhancements to pattern matching to support patterns in lists of elements.", - "_csharplang/proposals/csharp-11.0/low-level-struct-improvements.md": "This feature specification describes several features that improve the performance of `struct` types: `ref` fields and overriding lifetime defaults.", - "_csharplang/proposals/csharp-11.0/new-line-in-interpolation.md": "This feature describes changes to allow newlines in the interpolation expressions in an interpolated string expression.", - "_csharplang/proposals/csharp-11.0/numeric-intptr.md": "This feature enables the IntPtr and UIntPtr to be treated as the numeric types nint and nuint, respectively.", - "_csharplang/proposals/csharp-11.0/pattern-match-span-of-char-on-string.md": "This feature enables a Span to pattern match a literal string value.", - "_csharplang/proposals/csharp-11.0/raw-string-literal.md": "This feature describes raw string literals. Raw string literals enable string literals to avoid almost all escape sequences.", - "_csharplang/proposals/csharp-11.0/relaxing_shift_operator_requirements.md": "This feature removes the restriction that the right operand of a right shift must be an integer.", - "_csharplang/proposals/csharp-11.0/required-members.md": "This feature defines the required modifier. The required modifier instructs the compiler that a field or property must be initialized during the construction of a new object.", - "_csharplang/proposals/csharp-11.0/static-abstracts-in-interfaces.md": "This feature enables an interface to define static members. This enables interfaces to define operators that must be provided by implementing types.", - "_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md": "This feature defines a logical right-shift operator, `>>>`. The logical right shift operator always shifts in 0 values in the left-most bits during a shift.", - "_csharplang/proposals/csharp-11.0/utf8-string-literals.md": "This feature enables the `u8` suffix on a string literal. The `u8` suffix instructs the compiler to convert the UTF-8 string literal to a `ReadOnlySpan`.", "_csharplang/proposals/csharp-12.0/primary-constructors.md": "Primary constructors put the parameters of one constructor in scope for the whole class or struct to be used for initialization or directly as object state. The trade-off is that any other constructors must call through the primary constructor.", "_csharplang/proposals/csharp-12.0/using-alias-types.md": "Using directives can alias any type, not just named types. You can create aliases for tuple types, generics and more.", "_csharplang/proposals/csharp-12.0/lambda-method-group-defaults.md": "Optional and parameter array parameters for lambdas and method groups", @@ -785,7 +751,6 @@ "titleSuffix": { "docs/**/*.{md,yml}": ".NET", "_csharpstandard/standard/*.md": "C# language specification", - "_csharplang/proposals/csharp-11.0/*.md": "C# feature specifications", "_csharplang/proposals/csharp-12.0/*.md": "C# feature specifications", "_csharplang/proposals/csharp-13.0/*.md": "C# feature specifications", "_csharplang/proposals/csharp-14.0/*.md": "C# feature specifications", diff --git a/docs/csharp/language-reference/attributes/general.md b/docs/csharp/language-reference/attributes/general.md index c3dc0798087d3..c4bb0f7da9196 100644 --- a/docs/csharp/language-reference/attributes/general.md +++ b/docs/csharp/language-reference/attributes/general.md @@ -189,7 +189,7 @@ The `AsyncMethodBuilder` attribute can be applied to an async method to override You use these attributes to specify that a type is an *interpolated string handler*. The .NET 6 library already includes for scenarios where you use an interpolated string as the argument for a `string` parameter. You might have other instances where you want to control how interpolated strings are processed. You apply the to the type that implements your handler. You apply the to parameters of that type's constructor. -You can learn more about building an interpolated string handler in the [interpolated string expression handlers](~/_csharpstandard/standard/attributes.md#23591-custom-interpolated-string-expression-handlers) clause of the C# standard. +You can learn more about building an interpolated string handler in the [interpolated string expression handlers](~/_csharpstandard/standard/attributes.md#235101-custom-interpolated-string-expression-handlers) clause of the C# standard. ## `ModuleInitializer` attribute diff --git a/docs/csharp/language-reference/builtin-types/default-values.md b/docs/csharp/language-reference/builtin-types/default-values.md index 0cc74706ba3e6..37587975bda82 100644 --- a/docs/csharp/language-reference/builtin-types/default-values.md +++ b/docs/csharp/language-reference/builtin-types/default-values.md @@ -58,7 +58,7 @@ For more information, see the following sections of the [C# language specificati - [Default values](~/_csharpstandard/standard/variables.md#93-default-values) - [Default constructors](~/_csharpstandard/standard/types.md#833-default-constructors) - [Parameterless struct constructors](~/_csharpstandard/standard/structs.md#1659-constructors) -- [Auto default structs](~/_csharplang/proposals/csharp-11.0/auto-default-structs.md) +- [Auto default structs](~/_csharpstandard/standard/structs.md#16581-field-initializers) ## See also 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 b7be44c06a99e..9e9b64cf62645 100644 --- a/docs/csharp/language-reference/builtin-types/integral-numeric-types.md +++ b/docs/csharp/language-reference/builtin-types/integral-numeric-types.md @@ -156,7 +156,6 @@ 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](~/_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/ref-struct.md b/docs/csharp/language-reference/builtin-types/ref-struct.md index 43366da79547b..fabc3c2bcbc7c 100644 --- a/docs/csharp/language-reference/builtin-types/ref-struct.md +++ b/docs/csharp/language-reference/builtin-types/ref-struct.md @@ -87,7 +87,7 @@ For more information, see the following sections of the [C# language specificati - [Structs: Ref modifier](~/_csharpstandard/standard/structs.md#1623-ref-modifier) - [Safe context constraint for ref struct types](~/_csharpstandard/standard/structs.md#16515-safe-context-constraint) -For more information about `ref` fields, see the [Low-level struct improvements](~/_csharplang/proposals/csharp-11.0/low-level-struct-improvements.md) proposal note. +For more information about `ref` fields, see [Ref fields](~/_csharpstandard/standard/structs.md#16582-ref-fields) in the C# language specification. ## See also diff --git a/docs/csharp/language-reference/builtin-types/reference-types.md b/docs/csharp/language-reference/builtin-types/reference-types.md index 5ec7a60c84329..577702879b3cd 100644 --- a/docs/csharp/language-reference/builtin-types/reference-types.md +++ b/docs/csharp/language-reference/builtin-types/reference-types.md @@ -283,8 +283,7 @@ For more information, see the following sections of the [C# language specificati - [§8.2.4 The dynamic type](~/_csharpstandard/standard/types.md#824-the-dynamic-type) - [§8.2.5 The string type](~/_csharpstandard/standard/types.md#825-the-string-type) - [§8.2.8 Delegate types](~/_csharpstandard/standard/types.md#828-delegate-types) -- [Raw string literals](~/_csharplang/proposals/csharp-11.0/raw-string-literal.md) -- [UTF-8 string literals](~/_csharplang/proposals/csharp-11.0/utf8-string-literals.md) +- [§6.4.5.6 String literals](~/_csharpstandard/standard/lexical-structure.md#6456-string-literals) ### See also diff --git a/docs/csharp/language-reference/builtin-types/struct.md b/docs/csharp/language-reference/builtin-types/struct.md index 56d68670d71aa..b471e8528976e 100644 --- a/docs/csharp/language-reference/builtin-types/struct.md +++ b/docs/csharp/language-reference/builtin-types/struct.md @@ -180,7 +180,7 @@ For more information, see the [Structs](~/_csharpstandard/standard/structs.md) s - [Allow `with` expression on structs](~/_csharpstandard/standard/expressions.md#1210-with-expressions) - [Record structs](~/_csharpstandard/standard/structs.md#164-synthesized-record-struct-members) -You can also read about [Auto default structs](~/_csharplang/proposals/csharp-11.0/auto-default-structs.md) in the feature proposal specification. +You can also read about [Auto default structs](~/_csharpstandard/standard/structs.md#16581-field-initializers) in the C# language specification. ## See also 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 8f7df8e90337c..36c98af7f1158 100644 --- a/docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md +++ b/docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md @@ -254,7 +254,7 @@ The C# language requires specific pairings and signatures for Boolean operators - **CS9025**: *Checked operator requires a matching non-checked version to also be declared* - **CS9027**: *Unexpected keyword 'unchecked'* -The `checked` and `unchecked` keywords can only be applied to specific operator declarations. For the full rules, see [Arithmetic operators](../operators/arithmetic-operators.md#user-defined-checked-operators) and [User-defined checked operators](~/_csharplang/proposals/csharp-11.0/checked-user-defined-operators.md). +The `checked` and `unchecked` keywords can only be applied to specific operator declarations. For the full rules, see [Arithmetic operators](../operators/arithmetic-operators.md#user-defined-checked-operators) and [Operators](~/_csharpstandard/standard/classes.md#1510-operators) in the C# language specification. - Remove the `checked` or `unchecked` keyword from an unsupported operator (**CS9023**, **CS9024**). Only the arithmetic operators `+`, `-`, `*`, `/`, `++`, `--`, and explicit conversion operators support checked and unchecked variants. Other operators, such as comparison or equality operators, don't have distinct overflow behavior and can't be marked checked or unchecked. - Add a matching non-checked version of the operator (**CS9025**). A `checked` operator provides the overflow-throwing behavior, but the compiler also needs the corresponding unchecked version to use in `unchecked` contexts and as the default when neither context is specified. diff --git a/docs/csharp/language-reference/compiler-messages/parameter-argument-mismatch.md b/docs/csharp/language-reference/compiler-messages/parameter-argument-mismatch.md index 00a3032297680..24f03632f80d1 100644 --- a/docs/csharp/language-reference/compiler-messages/parameter-argument-mismatch.md +++ b/docs/csharp/language-reference/compiler-messages/parameter-argument-mismatch.md @@ -171,7 +171,7 @@ The compiler issues the following errors when you specified an [interpolated str - **CS8950**: *Parameter is an argument to the interpolated string handler conversion on parameter, but the corresponding argument is specified after the interpolated string expression.* - **CS8951**: *Parameter is not explicitly provided, but is used as an argument to the interpolated string handler conversion on parameter.* -An interpolated string handler is a pattern-based construct. It's important to get the pattern correct. Consult the C# language specification section on [custom interpolated string expression handlers](~/_csharpstandard/standard/attributes.md#23591-custom-interpolated-string-expression-handlers), or follow the tutorial on [building an interpolated string handler](../../advanced-topics/performance/interpolated-string-handler.md). +An interpolated string handler is a pattern-based construct. It's important to get the pattern correct. Consult the C# language specification section on [custom interpolated string expression handlers](~/_csharpstandard/standard/attributes.md#235101-custom-interpolated-string-expression-handlers), or follow the tutorial on [building an interpolated string handler](../../advanced-topics/performance/interpolated-string-handler.md). ## Caller debugging information diff --git a/docs/csharp/language-reference/compiler-messages/ref-modifiers-errors.md b/docs/csharp/language-reference/compiler-messages/ref-modifiers-errors.md index 3d16f7366fa28..d90ee157cb056 100644 --- a/docs/csharp/language-reference/compiler-messages/ref-modifiers-errors.md +++ b/docs/csharp/language-reference/compiler-messages/ref-modifiers-errors.md @@ -268,7 +268,7 @@ To correct these errors: - Remove the `unscoped` modifier or the attribute from struct constructors and init-only members. These members have special initialization semantics where the compiler must ensure that any references don't outlive the initialization phase, and allowing unscoped references would violate the guarantee that initialization completes before the struct becomes fully accessible (**CS9101**). - Remove the `unscoped` modifier from interface implementation methods when the corresponding interface method doesn't have it. The unscoped characteristic affects the method's contract regarding reference lifetime guarantees, and implementations must maintain the same contract as the interface they're implementing to ensure callers can rely on consistent lifetime behavior regardless of which implementation is invoked (**CS9102**). -For more information about scoped and unscoped references, see [Method parameters](../keywords/method-parameters.md) and the [low-level struct improvements](~/_csharplang/proposals/csharp-11.0/low-level-struct-improvements.md) feature specification. +For more information about scoped and unscoped references, see [Method parameters](../keywords/method-parameters.md) and [Safe context constraint](~/_csharpstandard/standard/structs.md#16515-safe-context-constraint) in the C# language specification. ## Reference variables require a referent diff --git a/docs/csharp/language-reference/compiler-messages/string-interpolations.md b/docs/csharp/language-reference/compiler-messages/string-interpolations.md index e1052089228de..6c9d387bffedd 100644 --- a/docs/csharp/language-reference/compiler-messages/string-interpolations.md +++ b/docs/csharp/language-reference/compiler-messages/string-interpolations.md @@ -61,7 +61,7 @@ When you implement a custom [interpolated string handler](../../advanced-topics/ - Make sure all `AppendLiteral` and `AppendFormatted` methods return either `void` or `bool` (**CS8941**). The handler pattern requires these methods to have one of these return types so the compiler can properly generate the interpolation code. Methods returning `bool` enable short-circuiting when the handler determines that further processing isn't needed. - Make sure all append methods in your handler type use the same return type (**CS8942**). If one method returns `void`, all append methods must return `void`. If one returns `bool`, all must return `bool`. Mixing return types prevents the compiler from generating consistent interpolation code. -- Apply the to your handler type and make sure it has a valid constructor (**CS8946**). An interpolated string handler type must be marked with this attribute and follow the [handler pattern](~/_csharpstandard/standard/attributes.md#23591-custom-interpolated-string-expression-handlers) to be recognized by the compiler. +- Apply the to your handler type and make sure it has a valid constructor (**CS8946**). An interpolated string handler type must be marked with this attribute and follow the [handler pattern](~/_csharpstandard/standard/attributes.md#235101-custom-interpolated-string-expression-handlers) to be recognized by the compiler. ## Interpolated string handler usage restrictions diff --git a/docs/csharp/language-reference/keywords/file.md b/docs/csharp/language-reference/keywords/file.md index 358c2a9389626..cb3088aca5a42 100644 --- a/docs/csharp/language-reference/keywords/file.md +++ b/docs/csharp/language-reference/keywords/file.md @@ -38,7 +38,7 @@ Member lookup prefers a file-local type declared in the same file over a non-fil ## C# language specification -For more information, see [Declared accessibility](~/_csharpstandard/standard/basic-concepts.md#752-declared-accessibility) in the [C# Language Specification](~/_csharpstandard/standard/README.md), and the [File local types](~/_csharplang/proposals/csharp-11.0/file-local-types.md) feature specification. +For more information, see [Declared accessibility](~/_csharpstandard/standard/basic-concepts.md#752-declared-accessibility) in the [C# Language Specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/keywords/interface.md b/docs/csharp/language-reference/keywords/interface.md index 4ad5edd303478..08ee4e083c088 100644 --- a/docs/csharp/language-reference/keywords/interface.md +++ b/docs/csharp/language-reference/keywords/interface.md @@ -91,7 +91,7 @@ The following example demonstrates interface implementation. In this example, th ## C# language specification -For more information, see the [Interfaces](~/_csharpstandard/standard/interfaces.md) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the feature spec for [static abstract members in interfaces](~/_csharplang/proposals/csharp-11.0/static-abstracts-in-interfaces.md). +For more information, see the [Interfaces](~/_csharpstandard/standard/interfaces.md) section of the [C# language specification](~/_csharpstandard/standard/README.md), including [Interface operators](~/_csharpstandard/standard/interfaces.md#1947-interface-operators) and [Interface static constructors](~/_csharpstandard/standard/interfaces.md#1948-interface-static-constructors). ## See also diff --git a/docs/csharp/language-reference/keywords/required.md b/docs/csharp/language-reference/keywords/required.md index 8afa29034d96a..d217aff88fdaa 100644 --- a/docs/csharp/language-reference/keywords/required.md +++ b/docs/csharp/language-reference/keywords/required.md @@ -35,4 +35,4 @@ The following code shows a class hierarchy that uses the `required` modifier for :::code language="csharp" source="./snippets/RequiredExample.cs" id="SnippetRequired"::: -For more information on required members, see the [C#11 - Required members](~/_csharplang/proposals/csharp-11.0/required-members.md) feature specification. +For more information on required members, see [Properties](~/_csharpstandard/standard/classes.md#157-properties) and [Required member attributes](~/_csharpstandard/standard/attributes.md#23511-required-member-attributes) in the C# language specification. 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 1b18ea4e478d9..985066a2bd785 100644 --- a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md +++ b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md @@ -201,8 +201,6 @@ For more information, see the following sections of the [C# language specificati - [Logical operators](~/_csharpstandard/standard/expressions.md#1216-logical-operators) - [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) - [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) ## See also diff --git a/docs/csharp/language-reference/operators/nameof.md b/docs/csharp/language-reference/operators/nameof.md index a64bd9fc4d5c3..c55666f5d2239 100644 --- a/docs/csharp/language-reference/operators/nameof.md +++ b/docs/csharp/language-reference/operators/nameof.md @@ -34,7 +34,7 @@ When the operand is a [verbatim identifier](../tokens/verbatim.md), the `@` char ## C# language specification -For more information, see the [Nameof expressions](~/_csharpstandard/standard/expressions.md#12823-the-nameof-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md), and the [Extended `nameof` scope](~/_csharplang/proposals/csharp-11.0/extended-nameof-scope.md) feature specification. +For more information, see the [Nameof expressions](~/_csharpstandard/standard/expressions.md#12823-the-nameof-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/patterns.md b/docs/csharp/language-reference/operators/patterns.md index 8da3b687b0044..ea57b9e570a9a 100644 --- a/docs/csharp/language-reference/operators/patterns.md +++ b/docs/csharp/language-reference/operators/patterns.md @@ -298,7 +298,7 @@ You can also nest a subpattern within a slice pattern, as the following example :::code language="csharp" source="snippets/patterns/ListPattern.cs" id="SliceWithPattern"::: -For more information, see the [List patterns](~/_csharplang/proposals/csharp-11.0/list-patterns.md) feature proposal note. +For more information, see [List pattern](~/_csharpstandard/standard/patterns.md#11211-list-pattern) in the C# language specification. ## Union patterns @@ -326,12 +326,11 @@ For more information, see [Union matching](../builtin-types/union.md#union-match ## C# language specification -For more information, see the [Patterns and pattern matching](~/_csharpstandard/standard/patterns.md) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Patterns and pattern matching](~/_csharpstandard/standard/patterns.md) section of the [C# language specification](~/_csharpstandard/standard/README.md), including: -For information about features added in C# 11 and later versions, see the following feature proposal notes: - -- [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) +- [List pattern](~/_csharpstandard/standard/patterns.md#11211-list-pattern) +- [Slice pattern](~/_csharpstandard/standard/patterns.md#11212-slice-pattern) +- [Constant pattern](~/_csharpstandard/standard/patterns.md#1123-constant-pattern) ## See also diff --git a/docs/csharp/language-reference/statements/checked-and-unchecked.md b/docs/csharp/language-reference/statements/checked-and-unchecked.md index a0dfdf02ef5c3..3e86db386636a 100644 --- a/docs/csharp/language-reference/statements/checked-and-unchecked.md +++ b/docs/csharp/language-reference/statements/checked-and-unchecked.md @@ -68,7 +68,7 @@ For more information, see the following sections of the [C# language specificati - [The checked and unchecked statements](~/_csharpstandard/standard/statements.md#1312-the-checked-and-unchecked-statements) - [The checked and unchecked operators](~/_csharpstandard/standard/expressions.md#12820-the-checked-and-unchecked-operators) -- [User-defined checked and unchecked operators](~/_csharplang/proposals/csharp-11.0/checked-user-defined-operators.md) +- [Operators](~/_csharpstandard/standard/classes.md#1510-operators) ## See also diff --git a/docs/csharp/language-reference/statements/declarations.md b/docs/csharp/language-reference/statements/declarations.md index 0cd0613d56cac..880b0fa481d33 100644 --- a/docs/csharp/language-reference/statements/declarations.md +++ b/docs/csharp/language-reference/statements/declarations.md @@ -119,7 +119,7 @@ For more information, see the following sections of the [C# language specificati - [Declaration statements](~/_csharpstandard/standard/statements.md#136-declaration-statements) - [Reference variables and returns](~/_csharpstandard/standard/variables.md#97-reference-variables-and-returns) -For more information about the `scoped` modifier, see the [Low-level struct improvements](~/_csharplang/proposals/csharp-11.0/low-level-struct-improvements.md) proposal note. +For more information about the `scoped` modifier, see [The scoped modifier](~/_csharpstandard/standard/variables.md#973-the-scoped-modifier) in the C# language specification. ## See also diff --git a/docs/csharp/language-reference/tokens/interpolated.md b/docs/csharp/language-reference/tokens/interpolated.md index 488b655b6d40f..61bbc3f68169a 100644 --- a/docs/csharp/language-reference/tokens/interpolated.md +++ b/docs/csharp/language-reference/tokens/interpolated.md @@ -96,7 +96,7 @@ If you're new to string interpolation, see the [String interpolation in C#](../. ## Compilation of interpolated strings -The compiler checks if an interpolated string is assigned to a type that satisfies the [_interpolated string handler pattern_](~/_csharpstandard/standard/attributes.md#23591-custom-interpolated-string-expression-handlers). An _interpolated string handler_ is a type that converts the interpolated string into a result string. When an interpolated string has the type `string`, the processes it. For the example of a custom interpolated string handler, see the [Write a custom string interpolation handler](../../advanced-topics/performance/interpolated-string-handler.md) tutorial. Use of an interpolated string handler is an advanced scenario, typically required for performance reasons. +The compiler checks if an interpolated string is assigned to a type that satisfies the [_interpolated string handler pattern_](~/_csharpstandard/standard/attributes.md#235101-custom-interpolated-string-expression-handlers). An _interpolated string handler_ is a type that converts the interpolated string into a result string. When an interpolated string has the type `string`, the processes it. For the example of a custom interpolated string handler, see the [Write a custom string interpolation handler](../../advanced-topics/performance/interpolated-string-handler.md) tutorial. Use of an interpolated string handler is an advanced scenario, typically required for performance reasons. > [!NOTE] > One side effect of interpolated string handlers is that a custom handler, including , might not evaluate all the interpolation expressions within the interpolated string under all conditions. That behavior means side effects of those expressions might not occur. @@ -107,10 +107,7 @@ If an interpolated string has the type or > :::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](~/_csharpstandard/standard/attributes.md#2359-the-moduleinitializer-attribute). +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#23510-the-moduleinitializer-attribute). ## Remarks diff --git a/docs/csharp/specification/overview.md b/docs/csharp/specification/overview.md index b9f8435c0d098..5c47dfeb02ba0 100644 --- a/docs/csharp/specification/overview.md +++ b/docs/csharp/specification/overview.md @@ -1,13 +1,13 @@ --- title: "Standard specification" description: "Understand the relationships among the ECMA C# standard and the working draft." -ms.date: 04/10/2026 +ms.date: 05/13/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 committee is currently finalizing version 8 of the standard. -The draft published here is a feature complete early draft of C# 10 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. +The draft published here is a feature complete early draft of C# 11 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 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. diff --git a/docs/csharp/specification/toc.yml b/docs/csharp/specification/toc.yml index 690379922a33c..1892f47024fdb 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# 10 early draft specification +- name: C# 11 early draft specification items: - name: Overview href: overview.md @@ -83,16 +83,6 @@ items: href: ../../../_csharplang/proposals/csharp-14.0/ignored-directives.md - name: Types items: - - name: File local types - href: ../../../_csharplang/proposals/csharp-11.0/file-local-types.md - - name: Raw string literals - href: ../../../_csharplang/proposals/csharp-11.0/raw-string-literal.md - - name: Interpolated string newline - 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: Numeric IntPtr - href: ../../../_csharplang/proposals/csharp-11.0/numeric-intptr.md - name: Named and optional parameters in expression trees href: ../../../_csharplang/proposals/csharp-14.0/optional-and-named-parameters-in-expression-trees.md - name: Variables @@ -103,12 +93,6 @@ items: items: - name: First class span types href: ../../../_csharplang/proposals/csharp-14.0/first-class-span-types.md - - name: Patterns - items: - - name: Pattern match span - href: ../../../_csharplang/proposals/csharp-11.0/pattern-match-span-of-char-on-string.md - - name: List patterns - href: ../../../_csharplang/proposals/csharp-11.0/list-patterns.md - name: Expressions items: - name: Collection expressions @@ -123,14 +107,6 @@ items: href: ../../../_csharplang/proposals/csharp-12.0/lambda-method-group-defaults.md - name: Simple lambda parameters with modifiers href: ../../../_csharplang/proposals/csharp-14.0/simple-lambda-parameters-with-modifiers.md - - name: Checked user-defined operators - href: ../../../_csharplang/proposals/csharp-11.0/checked-user-defined-operators.md - - name: Unsigned right-shift operator - href: ../../../_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md - - name: Relaxing shift operator - href: ../../../_csharplang/proposals/csharp-11.0/relaxing_shift_operator_requirements.md - - name: Extended nameof scope - href: ../../../_csharplang/proposals/csharp-11.0/extended-nameof-scope.md - name: Unbound generic types in nameof href: ../../../_csharplang/proposals/csharp-14.0/unbound-generic-types-in-nameof.md - name: Overload resolution priority @@ -157,8 +133,6 @@ items: href: ../../../_csharplang/proposals/csharp-14.0/field-keyword.md - name: Primary constructors href: ../../../_csharplang/proposals/csharp-12.0/primary-constructors.md - - name: Required members - href: ../../../_csharplang/proposals/csharp-11.0/required-members.md - name: Params collections href: ../../../_csharplang/proposals/csharp-13.0/params-collections.md - name: Extension members @@ -167,10 +141,6 @@ items: href: ../../../_csharplang/proposals/csharp-14.0/extension-operators.md - name: Structs items: - - name: Auto-default struct - href: ../../../_csharplang/proposals/csharp-11.0/auto-default-structs.md - - name: Low-level struct improvements - href: ../../../_csharplang/proposals/csharp-11.0/low-level-struct-improvements.md - name: Inline arrays href: ../../../_csharplang/proposals/csharp-12.0/inline-arrays.md - name: Unions @@ -179,14 +149,10 @@ items: href: ../../../_csharplang/proposals/unions.md - name: Interfaces items: - - name: Static abstracts in interfaces - href: ../../../_csharplang/proposals/csharp-11.0/static-abstracts-in-interfaces.md - name: Allow ref struct interfaces href: ../../../_csharplang/proposals/csharp-13.0/ref-struct-interfaces.md - name: Attributes items: - - name: Generic attributes - href: ../../../_csharplang/proposals/csharp-11.0/generic-attributes.md - name: Experimental attribute href: ../../../_csharplang/proposals/csharp-12.0/experimental-attribute.md - name: Deviations from the C# standard diff --git a/docs/csharp/whats-new/csharp-version-history.md b/docs/csharp/whats-new/csharp-version-history.md index 63048bb25af5a..52927bcffba90 100644 --- a/docs/csharp/whats-new/csharp-version-history.md +++ b/docs/csharp/whats-new/csharp-version-history.md @@ -132,7 +132,7 @@ C# 9 was released with .NET 5. It's the default language version for any assembl - [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](~/_csharpstandard/standard/attributes.md#2359-the-moduleinitializer-attribute) + - [Module initializers](~/_csharpstandard/standard/attributes.md#23510-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](~/_csharpstandard/standard/expressions.md#128172-object-creation-expressions) diff --git a/docs/standard/unsafe-code/best-practices.md b/docs/standard/unsafe-code/best-practices.md index e9f9f4e0ddd17..e1cb657c19787 100644 --- a/docs/standard/unsafe-code/best-practices.md +++ b/docs/standard/unsafe-code/best-practices.md @@ -127,7 +127,7 @@ but then the pointer is exposed outside of the `fixed` block. This creates a dan ### Recommendations 1. ✔️ DO make sure that pointers in `fixed` blocks do not leave the defined scope. -2. ✔️ DO prefer safe low-level primitives with built-in escape analysis, such as C#'s [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md). For more information, see [Low-level struct improvements](~/_csharplang/proposals/csharp-11.0/low-level-struct-improvements.md). +2. ✔️ DO prefer safe low-level primitives with built-in escape analysis, such as C#'s [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md). For more information, see [Safe context constraint](/dotnet/csharp/language-reference/language-specification/structs#16515-safe-context-constraint). ## 3. Internal implementation details of the runtime and libraries