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

Filter by extension

Filter by extension

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions docs/csharp/language-reference/builtin-types/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ For more information, see the following sections of the [C# language specificati

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/csharp/language-reference/builtin-types/record.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:

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

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

You can correct these errors by using the following guidance:

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

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

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

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

> [!NOTE]
> The current version of the C# compiler (Roslyn) doesn't produce **CS0467**. You might see this error if you're using an older compiler version.
Expand Down
Loading
Loading