From 56d3b7dd7af78a0d7c3c4ea86dce22c847bded07 Mon Sep 17 00:00:00 2001 From: Hadrian Tang Date: Mon, 4 Aug 2025 21:37:23 +0800 Subject: [PATCH 01/18] `with` is also used in properties and interface implementations (#47701) * `with` is also used in properties * Interface with --- docs/fsharp/language-reference/keyword-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fsharp/language-reference/keyword-reference.md b/docs/fsharp/language-reference/keyword-reference.md index 80f37a081d69e..5713ea57739fd 100644 --- a/docs/fsharp/language-reference/keyword-reference.md +++ b/docs/fsharp/language-reference/keyword-reference.md @@ -156,7 +156,7 @@ The following table shows all F# keywords in alphabetical order, together with b |`void`|[Primitive Types](basic-types.md)|Indicates the .NET `void` type. Used when interoperating with other .NET languages.| |`when`|[Constraints](./generics/constraints.md)|Used for Boolean conditions (*when guards*) on pattern matches and to introduce a constraint clause for a generic type parameter.| |`while`|[Loops: `while...do` Expression](loops-while-do-expression.md)|Introduces a looping construct.| -|`with`|[Match Expressions](match-expressions.md)

[Object Expressions](object-expressions.md)

[Copy and Update Record Expressions](copy-and-update-record-expressions.md)

[Type Extensions](type-extensions.md)

[Exceptions: The `try...with` Expression](./exception-handling/the-try-with-expression.md)|Used together with the `match` keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers.| +|`with`|[Match Expressions](match-expressions.md)

[Object Expressions](object-expressions.md)

[Copy and Update Record Expressions](copy-and-update-record-expressions.md)

[Type Extensions](type-extensions.md)

[Exceptions: The `try...with` Expression](./exception-handling/the-try-with-expression.md)

[Interfaces](interfaces.md)

[Properties](./members/properties.md)|Used together with the `match` keyword in pattern matching expressions. Also used in object expressions, record copying expressions, type extensions to introduce member definitions, exception handlers, interface implementations, and declarations of properties with explicit getters and setters.| |`yield`|[Lists](lists.md), [Arrays](arrays.md), [Sequences](sequences.md)|Used in a list, array, or sequence expression to produce a value for a sequence. Typically can be omitted, as it is implicit in most situations.| |`yield!`|[Computation Expressions](computation-expressions.md)

[Async expressions](async-expressions.md)

[Task expressions](task-expressions.md)|Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression.| |`const`|[Type Providers](../tutorials/type-providers/index.md)| Type Providers allow the use of `const` as a keyword to specify a constant literal as a type parameter argument.| From fd0ec3f1a43e69a822bd9d29391ccf591e78a119 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 4 Aug 2025 09:22:43 -0700 Subject: [PATCH 02/18] Update package index with latest published versions (#47722) --- docs/azure/includes/dotnet-all.md | 8 ++++---- docs/azure/includes/dotnet-new.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index cf8305c80456f..5b75f7cb0516d 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -180,7 +180,7 @@ | Resource Management - App Compliance Automation | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.AppComplianceAutomation/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AppComplianceAutomation-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppComplianceAutomation_1.0.1/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/) | | Resource Management - App Configuration | NuGet [1.4.1](https://www.nuget.org/packages/Azure.ResourceManager.AppConfiguration/1.4.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AppConfiguration-readme) | GitHub [1.4.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppConfiguration_1.4.1/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/) | | Resource Management - App Service | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.AppService/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AppService-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppService_1.4.0/sdk/websites/Azure.ResourceManager.AppService/) | -| Resource Management - Application Insights | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ApplicationInsights-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.0.1/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/) | +| Resource Management - Application Insights | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.0.1)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ApplicationInsights-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.0.1/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.1.0-beta.1/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/) | | Resource Management - Arizeaiobservabilityeval | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ArizeAIObservabilityEval/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ArizeAIObservabilityEval-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ArizeAIObservabilityEval_1.0.0/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/) | | Resource Management - Astro | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Astro/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Astro-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Astro_1.0.0-beta.2/sdk/astronomer/Azure.ResourceManager.Astro/) | | Resource Management - Attestation | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.Attestation/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.Attestation-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Attestation_1.0.0-beta.5/sdk/attestation/Azure.ResourceManager.Attestation/) | @@ -216,7 +216,7 @@ | Resource Management - Container Service | NuGet [1.2.5](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.2.5) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerService-readme) | GitHub [1.2.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.2.5/sdk/containerservice/Azure.ResourceManager.ContainerService/) | | Resource Management - Container Service Fleet | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerServiceFleet/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerServiceFleet-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerServiceFleet_1.1.0/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/) | | Resource Management - Content Delivery Network | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.4.0/sdk/cdn/Azure.ResourceManager.Cdn/) | -| Resource Management - Cosmos DB | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.3.2)
NuGet [1.4.0-beta.12](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.4.0-beta.12) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.3.2/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/)
GitHub [1.4.0-beta.12](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.4.0-beta.12/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) | +| Resource Management - Cosmos DB | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.3.2)
NuGet [1.4.0-beta.13](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.4.0-beta.13) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.3.2/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/)
GitHub [1.4.0-beta.13](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.4.0-beta.13/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) | | Resource Management - Cosmos DB for PostgreSQL | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDBForPostgreSql/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDBForPostgreSql/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDBForPostgreSql-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDBForPostgreSql_1.0.0/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDBForPostgreSql_1.1.0-beta.2/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/) | | Resource Management - Costmanagement | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.CostManagement/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CostManagement-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CostManagement_1.0.2/sdk/costmanagement/Azure.ResourceManager.CostManagement/) | | Resource Management - Customer Insights | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.CustomerInsights/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.CustomerInsights-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CustomerInsights_1.0.0-beta.5/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/) | @@ -230,7 +230,7 @@ | Resource Management - Data Share | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.DataShare/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataShare-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataShare_1.1.1/sdk/datashare/Azure.ResourceManager.DataShare/) | | Resource Management - Database Fleet Manager | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DatabaseFleetManager/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DatabaseFleetManager-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DatabaseFleetManager_1.0.0-beta.1/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/) | | Resource Management - Database Watcher | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DatabaseWatcher/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DatabaseWatcher-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DatabaseWatcher_1.0.0-beta.1/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/) | -| Resource Management - Datadog | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.Datadog-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0-beta.5/sdk/datadog/Azure.ResourceManager.Datadog/) | +| Resource Management - Datadog | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0-beta.6) | [docs](/dotnet/api/overview/azure/ResourceManager.Datadog-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0-beta.6/sdk/datadog/Azure.ResourceManager.Datadog/) | | Resource Management - Defender EASM | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.DefenderEasm/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.DefenderEasm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DefenderEasm_1.0.0-beta.3/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/) | | Resource Management - Dell.Storage | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Dell.Storage/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dell.Storage-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dell.Storage_1.0.0-beta.1/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/) | | Resource Management - Dependencymap | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DependencyMap/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DependencyMap-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DependencyMap_1.0.0-beta.1/sdk/dependencymap/Azure.ResourceManager.DependencyMap/) | @@ -289,7 +289,7 @@ | Resource Management - Machine Learning | NuGet [1.2.2](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearning/1.2.2) | [docs](/dotnet/api/overview/azure/ResourceManager.MachineLearning-readme) | GitHub [1.2.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearning_1.2.2/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/) | | Resource Management - Machine Learning Compute | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearningCompute/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.MachineLearningCompute-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearningCompute_1.0.0-beta.5/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/) | | Resource Management - Maintenance | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.Maintenance/1.1.2)
NuGet [1.2.0-beta.9](https://www.nuget.org/packages/Azure.ResourceManager.Maintenance/1.2.0-beta.9) | [docs](/dotnet/api/overview/azure/ResourceManager.Maintenance-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maintenance_1.1.2/sdk/maintenance/Azure.ResourceManager.Maintenance/)
GitHub [1.2.0-beta.9](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maintenance_1.2.0-beta.9/sdk/maintenance/Azure.ResourceManager.Maintenance/) | -| Resource Management - Managed Grafana | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.1.1)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Grafana-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.1.1/sdk/grafana/Azure.ResourceManager.Grafana/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.2.0-beta.1/sdk/grafana/Azure.ResourceManager.Grafana/) | +| Resource Management - Managed Grafana | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.1.1)
NuGet [1.2.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.2.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Grafana-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.1.1/sdk/grafana/Azure.ResourceManager.Grafana/)
GitHub [1.2.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.2.0-beta.2/sdk/grafana/Azure.ResourceManager.Grafana/) | | Resource Management - Managed Network | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.ManagedNetwork/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedNetwork-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedNetwork_1.0.0-beta.5/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/) | | Resource Management - Managed Network Fabric | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.ManagedNetworkFabric/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedNetworkFabric-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedNetworkFabric_1.1.2/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/) | | Resource Management - Managed Service Identity | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServiceIdentities/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServiceIdentities-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServiceIdentities_1.4.0/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/) | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index 3400f160d20f3..a3ee4b2efa0ac 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -187,7 +187,7 @@ | Resource Management - App Configuration | NuGet [1.4.1](https://www.nuget.org/packages/Azure.ResourceManager.AppConfiguration/1.4.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AppConfiguration-readme) | GitHub [1.4.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppConfiguration_1.4.1/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/) | | Resource Management - App Platform | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.AppPlatform/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.AppPlatform-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppPlatform_1.1.2/sdk/appplatform/Azure.ResourceManager.AppPlatform/) | | Resource Management - App Service | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.AppService/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AppService-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppService_1.4.0/sdk/websites/Azure.ResourceManager.AppService/) | -| Resource Management - Application Insights | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ApplicationInsights-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.0.1/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/) | +| Resource Management - Application Insights | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.0.1)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ApplicationInsights-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.0.1/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.1.0-beta.1/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/) | | Resource Management - Arc ScVmm | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.ArcScVmm/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.ArcScVmm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ArcScVmm_1.0.0-beta.4/sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm/) | | Resource Management - Arizeaiobservabilityeval | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ArizeAIObservabilityEval/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ArizeAIObservabilityEval-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ArizeAIObservabilityEval_1.0.0/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/) | | Resource Management - Astro | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Astro/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Astro-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Astro_1.0.0-beta.2/sdk/astronomer/Azure.ResourceManager.Astro/) | @@ -224,7 +224,7 @@ | Resource Management - Container Service | NuGet [1.2.5](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.2.5) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerService-readme) | GitHub [1.2.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.2.5/sdk/containerservice/Azure.ResourceManager.ContainerService/) | | Resource Management - Container Service Fleet | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerServiceFleet/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerServiceFleet-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerServiceFleet_1.1.0/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/) | | Resource Management - Content Delivery Network | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.4.0/sdk/cdn/Azure.ResourceManager.Cdn/) | -| Resource Management - Cosmos DB | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.3.2)
NuGet [1.4.0-beta.12](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.4.0-beta.12) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.3.2/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/)
GitHub [1.4.0-beta.12](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.4.0-beta.12/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) | +| Resource Management - Cosmos DB | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.3.2)
NuGet [1.4.0-beta.13](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.4.0-beta.13) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.3.2/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/)
GitHub [1.4.0-beta.13](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.4.0-beta.13/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) | | Resource Management - Cosmos DB for PostgreSQL | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDBForPostgreSql/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDBForPostgreSql/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDBForPostgreSql-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDBForPostgreSql_1.0.0/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDBForPostgreSql_1.1.0-beta.2/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/) | | Resource Management - Costmanagement | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.CostManagement/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CostManagement-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CostManagement_1.0.2/sdk/costmanagement/Azure.ResourceManager.CostManagement/) | | Resource Management - Customer Insights | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.CustomerInsights/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.CustomerInsights-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CustomerInsights_1.0.0-beta.5/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/) | @@ -238,7 +238,7 @@ | Resource Management - Data Share | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.DataShare/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataShare-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataShare_1.1.1/sdk/datashare/Azure.ResourceManager.DataShare/) | | Resource Management - Database Fleet Manager | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DatabaseFleetManager/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DatabaseFleetManager-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DatabaseFleetManager_1.0.0-beta.1/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/) | | Resource Management - Database Watcher | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DatabaseWatcher/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DatabaseWatcher-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DatabaseWatcher_1.0.0-beta.1/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/) | -| Resource Management - Datadog | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.Datadog-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0-beta.5/sdk/datadog/Azure.ResourceManager.Datadog/) | +| Resource Management - Datadog | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0-beta.6) | [docs](/dotnet/api/overview/azure/ResourceManager.Datadog-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0-beta.6/sdk/datadog/Azure.ResourceManager.Datadog/) | | Resource Management - Defender EASM | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.DefenderEasm/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.DefenderEasm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DefenderEasm_1.0.0-beta.3/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/) | | Resource Management - Dell.Storage | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Dell.Storage/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dell.Storage-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dell.Storage_1.0.0-beta.1/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/) | | Resource Management - Dependencymap | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DependencyMap/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DependencyMap-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DependencyMap_1.0.0-beta.1/sdk/dependencymap/Azure.ResourceManager.DependencyMap/) | @@ -298,7 +298,7 @@ | Resource Management - Machine Learning | NuGet [1.2.2](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearning/1.2.2) | [docs](/dotnet/api/overview/azure/ResourceManager.MachineLearning-readme) | GitHub [1.2.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearning_1.2.2/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/) | | Resource Management - Machine Learning Compute | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearningCompute/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.MachineLearningCompute-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearningCompute_1.0.0-beta.5/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/) | | Resource Management - Maintenance | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.Maintenance/1.1.2)
NuGet [1.2.0-beta.9](https://www.nuget.org/packages/Azure.ResourceManager.Maintenance/1.2.0-beta.9) | [docs](/dotnet/api/overview/azure/ResourceManager.Maintenance-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maintenance_1.1.2/sdk/maintenance/Azure.ResourceManager.Maintenance/)
GitHub [1.2.0-beta.9](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maintenance_1.2.0-beta.9/sdk/maintenance/Azure.ResourceManager.Maintenance/) | -| Resource Management - Managed Grafana | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.1.1)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Grafana-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.1.1/sdk/grafana/Azure.ResourceManager.Grafana/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.2.0-beta.1/sdk/grafana/Azure.ResourceManager.Grafana/) | +| Resource Management - Managed Grafana | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.1.1)
NuGet [1.2.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.2.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Grafana-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.1.1/sdk/grafana/Azure.ResourceManager.Grafana/)
GitHub [1.2.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.2.0-beta.2/sdk/grafana/Azure.ResourceManager.Grafana/) | | Resource Management - Managed Network | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.ManagedNetwork/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedNetwork-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedNetwork_1.0.0-beta.5/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/) | | Resource Management - Managed Network Fabric | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.ManagedNetworkFabric/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedNetworkFabric-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedNetworkFabric_1.1.2/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/) | | Resource Management - Managed Service Identity | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServiceIdentities/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServiceIdentities-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServiceIdentities_1.4.0/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/) | From 4dd8eba51fa7116addd80e06606404aa46b03215 Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Tue, 5 Aug 2025 00:23:05 +0800 Subject: [PATCH 03/18] increase two predefined scenarios (#47720) Co-authored-by: Xuyang Cao --- docs/azure/migration/appmod/predefined-tasks.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/azure/migration/appmod/predefined-tasks.md b/docs/azure/migration/appmod/predefined-tasks.md index d1e4ad095b6a8..acca8b870bb11 100644 --- a/docs/azure/migration/appmod/predefined-tasks.md +++ b/docs/azure/migration/appmod/predefined-tasks.md @@ -23,9 +23,9 @@ Predefined tasks capture industry best practices for using Azure services. Curre App Modernization for .NET currently supports the following predefined tasks: -- **Migrate to Managed Identity based Database on Azure, including Azure SQL DB and Azure PostgreSQL** +- **Migrate to Managed Identity based Database on Azure, including Azure SQL DB, Azure SQL MI and Azure PostgreSQL** - Modernize your data layer by migrating from on-premises or legacy databases (such as DB2, Oracle DB, or SQL Server) to Azure SQL DB or Azure PostgreSQL, using secure managed identity authentication. + Modernize your data layer by migrating from on-premises or legacy databases (such as DB2, Oracle DB, or SQL Server) to Azure SQL DB, Azure SQL Managed Instance or Azure PostgreSQL, using secure managed identity authentication. - **Migrate to Azure File Storage** @@ -54,3 +54,7 @@ App Modernization for .NET currently supports the following predefined tasks: - **Migrate to Confluent Cloud/Azure Event Hub for Apache Kafka** Transition from local or on-premises Kafka to managed event streaming with Confluent Cloud or Azure Event Hubs. + +- **Migrate to OpenTelemetry on Azure** + + Transition from local logging frameworks like log4net, serilog, windows event log to OpenTelemetry on Azure. From 405d5595fc3d55c1453639f19f89c482e406cf66 Mon Sep 17 00:00:00 2001 From: Adit Sheth Date: Mon, 4 Aug 2025 09:25:40 -0700 Subject: [PATCH 04/18] Fixed typo for Json. (#47717) Co-authored-by: Adit Sheth --- docs/core/diagnostics/observability-otlp-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/diagnostics/observability-otlp-example.md b/docs/core/diagnostics/observability-otlp-example.md index cf717f046cd96..da49d7df305d2 100644 --- a/docs/core/diagnostics/observability-otlp-example.md +++ b/docs/core/diagnostics/observability-otlp-example.md @@ -75,7 +75,7 @@ It then registers the OTLP exporter using env vars for its configuration. The OTLP exporter can be configured via APIs in code, but its more common to configure it via environment variables. Add the following to _AppSettings.Development.json_ -``` josn +``` json "OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4317", "OTEL_SERVICE_NAME": "OTLP-Example" ``` From 89db11c915e6b0b0059943f96700feb5662f58a5 Mon Sep 17 00:00:00 2001 From: Stuart Mosquera Date: Mon, 4 Aug 2025 13:29:17 -0300 Subject: [PATCH 05/18] add clarification for increment/decrement operator overloading (#47710) * add clarification for operator overloading * fix grammar * Update docs/csharp/language-reference/operators/operator-overloading.md --------- Co-authored-by: Bill Wagner --- .../csharp/language-reference/operators/operator-overloading.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/operators/operator-overloading.md b/docs/csharp/language-reference/operators/operator-overloading.md index 2e411016eb6af..d99257a9fcf5d 100644 --- a/docs/csharp/language-reference/operators/operator-overloading.md +++ b/docs/csharp/language-reference/operators/operator-overloading.md @@ -18,7 +18,7 @@ Use the `operator` keyword to declare an operator. An operator declaration must - It includes a `public` modifier. - A unary operator has one input parameter. A binary operator has two input parameters. In each case, at least one parameter must have type `T` or `T?` where `T` is the type that contains the operator declaration. - It includes the `static` modifier, except for the compound assignment operators, such as `+=`. -- The increment (`++`) and decrement (`--`) operators can be implemented as either static or instance methods. +- The increment (`++`) and decrement (`--`) operators can be implemented as either static or instance methods. Instance method operators are a new feature introduced in C# 14. The following example defines a simplified structure to represent a rational number. The structure overloads some of the [arithmetic operators](arithmetic-operators.md): From af447e3e91ce3a5c563faae8f12e27a4e189785f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 13:35:42 -0400 Subject: [PATCH 06/18] Improve CS0430 extern alias documentation with practical usage examples (#47708) * Initial plan * Improve CS0430 extern alias example to show actual usage Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Add cross-reference to extern alias documentation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/csharp/misc/cs0430.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/csharp/misc/cs0430.md b/docs/csharp/misc/cs0430.md index 6f6df8d2a3b3f..8f2b0c945610c 100644 --- a/docs/csharp/misc/cs0430.md +++ b/docs/csharp/misc/cs0430.md @@ -19,7 +19,10 @@ The extern alias 'alias' was not specified in a /reference option ```csharp // CS0430_a.cs // compile with: /target:library -public class MyClass {} +public class MyClass +{ + public static void M() { /*...*/ } +} ``` ## Example 2 @@ -31,6 +34,10 @@ public class MyClass {} extern alias MyType; // CS0430 public class Test { - public static void Main() {} + public static void Main() { MyType::MyClass.M(); } } ``` + +## See also + +- [extern alias](../language-reference/keywords/extern-alias.md) From 1e0632304078837be5a49372f2d57c9e43c3de43 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 18:14:37 +0000 Subject: [PATCH 07/18] Document projection initializers (simplified names) for anonymous types (#47709) * Initial plan * Document projection initializers (simplified names) for anonymous types Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Clarify duplicate member name explanation for projection initializers Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Add periods to code comments in anonymous types examples Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../fundamentals/types/anonymous-types.md | 18 ++++++++++ .../types/snippets/anonymous-types/Program.cs | 34 +++++++++++++++++-- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/docs/csharp/fundamentals/types/anonymous-types.md b/docs/csharp/fundamentals/types/anonymous-types.md index d86d624246787..14ff13c4f8a6e 100644 --- a/docs/csharp/fundamentals/types/anonymous-types.md +++ b/docs/csharp/fundamentals/types/anonymous-types.md @@ -38,6 +38,24 @@ If you don't specify member names in the anonymous type, the compiler gives the :::code language="csharp" source="snippets/anonymous-types/Program.cs" ID="snippet81"::: +## Projection initializers + +Anonymous types support *projection initializers*, which allow you to use local variables or parameters directly without explicitly specifying the member name. The compiler infers the member names from the variable names. The following example demonstrates this simplified syntax: + +:::code language="csharp" source="snippets/anonymous-types/Program.cs" ID="ProjectionInitializers"::: + +This simplified syntax is particularly useful when creating anonymous types with many properties: + +:::code language="csharp" source="snippets/anonymous-types/Program.cs" ID="ProjectionExample"::: + +The member name isn't inferred in the following cases: + +- The candidate name is a member name of an anonymous type, such as `ToString` or `GetHashCode`. +- The candidate name is a duplicate of another property member in the same anonymous type, either explicit or implicit. +- The candidate name isn't a valid identifier (for example, it contains spaces or special characters). + +In these cases, you must explicitly specify the member name. + > [!TIP] > You can use .NET style rule [IDE0037](../../../fundamentals/code-analysis/style-rules/ide0037.md) to enforce whether inferred or explicit member names are preferred. diff --git a/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs b/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs index 2b64b2cb05cda..4b665a0007a5b 100644 --- a/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs +++ b/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs @@ -18,9 +18,9 @@ class Anonymous { static void Main() { - // don't show this unless you add a bunch more - // properties to the type. otherwise it obviates the - // need for the anonymous type + // Don't show this unless you add a bunch more + // properties to the type. Otherwise it obviates the + // need for the anonymous type. List products = new () { new Product() { Color="Orange", Price=2.00M}, @@ -50,6 +50,34 @@ from prod in products var shipment = new { address = "Nowhere St.", product }; var shipmentWithBonus = new { address = "Somewhere St.", product, bonus }; // + + // + // Explicit member names. + var personExplicit = new { FirstName = "Kyle", LastName = "Mit" }; + + // Projection initializers (inferred member names). + var firstName = "Kyle"; + var lastName = "Mit"; + var personInferred = new { firstName, lastName }; + + // Both create equivalent anonymous types with the same property names. + Console.WriteLine($"Explicit: {personExplicit.FirstName} {personExplicit.LastName}"); + Console.WriteLine($"Inferred: {personInferred.firstName} {personInferred.lastName}"); + // + + // + var title = "Software Engineer"; + var department = "Engineering"; + var salary = 75000; + + // Using projection initializers. + var employee = new { title, department, salary }; + + // Equivalent to explicit syntax: + // var employee = new { title = title, department = department, salary = salary }; + + Console.WriteLine($"Title: {employee.title}, Department: {employee.department}, Salary: {employee.salary}"); + // } } } From 6af8c823d3044680c78c42554b5f1b3d79939ff0 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:21:58 -0400 Subject: [PATCH 08/18] Fix misleading equality testing method documentation in C# objects guide (#47672) * Initial plan * Fix misleading equality testing method documentation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/csharp/fundamentals/object-oriented/objects.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/csharp/fundamentals/object-oriented/objects.md b/docs/csharp/fundamentals/object-oriented/objects.md index 9b2dd20b85d8f..9f003e0893984 100644 --- a/docs/csharp/fundamentals/object-oriented/objects.md +++ b/docs/csharp/fundamentals/object-oriented/objects.md @@ -34,12 +34,12 @@ The memory for both `p1` and `p2` is allocated on the thread stack. That memory When you compare two objects for equality, you must first distinguish whether you want to know whether the two variables represent the same object in memory, or whether the values of one or more of their fields are equivalent. If you're intending to compare values, you must consider whether the objects are instances of value types (structs) or reference types (classes, delegates, arrays). -- To determine whether two class instances refer to the same location in memory (which means that they have the same *identity*), use the static method. ( is the implicit base class for all value types and reference types, including user-defined structs and classes.) -- To determine whether the instance fields in two struct instances have the same values, use the method. Because all structs implicitly inherit from , you call the method directly on your object as shown in the following example: +- To determine whether two class instances refer to the same location in memory (which means that they have the same *identity*), use the static method. ( is the implicit base class for all value types and reference types, including user-defined structs and classes.) +- The method, by default, determines whether the instance fields in two struct instances have the same values. Because all structs implicitly inherit from , you call the method directly on your object as shown in the following example: :::code language="csharp" source="./snippets/objects/Equality.cs" ID="Snippet32"::: - The implementation of `Equals` uses boxing and reflection in some cases. For information about how to provide an efficient equality algorithm that is specific to your type, see [How to define value equality for a type](../../programming-guide/statements-expressions-operators/how-to-define-value-equality-for-a-type.md). Records are reference types that use value semantics for equality. + The default implementation of `Equals` uses boxing and reflection in some cases. For information about how to provide an efficient equality algorithm that is specific to your type, see [How to define value equality for a type](../../programming-guide/statements-expressions-operators/how-to-define-value-equality-for-a-type.md). Records are reference types that use value semantics for equality. - To determine whether the values of the fields in two class instances are equal, you might be able to use the method or the [== operator](../../language-reference/operators/equality-operators.md#equality-operator-). However, only use them if the class has overridden or overloaded them to provide a custom definition of what "equality" means for objects of that type. The class might also implement the interface or the interface. Both interfaces provide methods that can be used to test value equality. When designing your own classes that override `Equals`, make sure to follow the guidelines stated in [How to define value equality for a type](../../programming-guide/statements-expressions-operators/how-to-define-value-equality-for-a-type.md) and . From 8df888d8e7ea83487a38fb813cdc7bcdeda89288 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 18:22:37 +0000 Subject: [PATCH 09/18] Update CS0524 documentation to reflect C# 8.0 changes allowing nested types in interfaces (#47669) * Initial plan * Update CS0524 documentation to reflect C# 8.0 changes Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Update ms.date to 07/31/2025 as requested Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Improve wording as suggested by @gewarren Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/csharp/misc/cs0524.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/csharp/misc/cs0524.md b/docs/csharp/misc/cs0524.md index 949d57811f3e0..d373390fe06d0 100644 --- a/docs/csharp/misc/cs0524.md +++ b/docs/csharp/misc/cs0524.md @@ -1,7 +1,7 @@ --- description: "Compiler Error CS0524" title: "Compiler Error CS0524" -ms.date: 07/20/2015 +ms.date: 07/31/2025 f1_keywords: - "CS0524" helpviewer_keywords: @@ -12,18 +12,26 @@ ms.assetid: a5cd8fb0-f5df-4580-9116-a6be4dffd1cb 'type' : interfaces cannot declare types - An [interface](../language-reference/keywords/interface.md) cannot contain a user-defined type; it should contain only methods and properties. - -## Example +Prior to C# 8.0, an [interface](../language-reference/keywords/interface.md) could not contain user-defined types. Starting with C# 8.0, interfaces can declare [nested types](../programming-guide/classes-and-structs/nested-types.md) as part of the default interface members feature. + +In modern C# (C# 8.0 and later), this error is no longer generated for nested types in interfaces. The compiler now allows interfaces to contain nested classes, structs, interfaces, enums, and delegates. + +## Historical example - The following sample generates CS0524: +The following sample generates CS0524 in C# versions prior to 8.0, but is valid in modern C# versions: ```csharp -// CS0524.cs -public interface Clx +// This code is valid in C# 8.0 and later +public interface IExample { - public class Cly // CS0524, delete user-defined type + public class NestedClass // Valid since C# 8.0 { } } ``` + +## See also + +- [Interfaces](../language-reference/keywords/interface.md) +- [Nested types](../programming-guide/classes-and-structs/nested-types.md) +- [What's new in C# version history](../whats-new/csharp-version-history.md#c-version-80) From 190605ba4458a9084663c95d3673fce0d2286000 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:23:27 -0400 Subject: [PATCH 10/18] Fix nullable event warning in interface events documentation (#47684) * Initial plan * Fix nullable event warning in interface events documentation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../events/how-to-implement-interface-events.md | 2 +- .../VS_Snippets_VBCSharp/csProgGuideEvents/CS/Events.cs | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/csharp/programming-guide/events/how-to-implement-interface-events.md b/docs/csharp/programming-guide/events/how-to-implement-interface-events.md index 0561e4e77ad91..81c49af87d8fd 100644 --- a/docs/csharp/programming-guide/events/how-to-implement-interface-events.md +++ b/docs/csharp/programming-guide/events/how-to-implement-interface-events.md @@ -29,7 +29,7 @@ namespace ImplementInterfaceEvents } public class Shape : IDrawingObject { - public event EventHandler ShapeChanged; + public event EventHandler? ShapeChanged; void ChangeShape() { // Do something here before the event… diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideEvents/CS/Events.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideEvents/CS/Events.cs index 20f6f0797ce1d..6a959a4e65448 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideEvents/CS/Events.cs +++ b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideEvents/CS/Events.cs @@ -686,10 +686,10 @@ public class MyEventArgs : EventArgs } public class Shape : IDrawingObject { - public event EventHandler ShapeChanged; + public event EventHandler? ShapeChanged; void ChangeShape() { - // Do something here before the event� + // Do something here before the event… OnShapeChanged(new MyEventArgs(/*arguments*/)); @@ -697,10 +697,7 @@ void ChangeShape() } protected virtual void OnShapeChanged(MyEventArgs e) { - if (ShapeChanged != null) - { - ShapeChanged(this, e); - } + ShapeChanged?.Invoke(this, e); } } } From 2b917e03f39137a33c747cd870445e30dc479504 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:23:40 -0400 Subject: [PATCH 11/18] Update CS0518 documentation with actionable guidance for modern .NET projects (#47685) * Initial plan * Update CS0518 documentation with modern .NET project guidance Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Update docs/csharp/language-reference/compiler-messages/cs0518.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- .../compiler-messages/cs0518.md | 35 ++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/docs/csharp/language-reference/compiler-messages/cs0518.md b/docs/csharp/language-reference/compiler-messages/cs0518.md index 4e39b1afd5a50..a0c45f1dd582b 100644 --- a/docs/csharp/language-reference/compiler-messages/cs0518.md +++ b/docs/csharp/language-reference/compiler-messages/cs0518.md @@ -11,8 +11,11 @@ ms.assetid: b0b61cbb-c9a7-48c9-9e60-7cdd5ecb3e6c # Compiler Error CS0518 Predefined type 'type' is not defined or imported - -The main cause for this problem is that the project is not importing mscorlib.dll, which defines the entire System namespace. This can be caused by one of the following: + +> [!NOTE] +> The resolution for this error depends on whether you're using a modern SDK-style project (`.csproj` files that start with ``) or legacy project formats. SDK-style projects manage runtime references automatically through the `` property. + +The main cause for this problem is that the project cannot access the predefined types from the .NET runtime library. In modern SDK-style projects, this is typically due to an incorrect or missing `` specification. In legacy projects, this issue is caused by not importing mscorlib.dll, which defines the entire namespace. This can be caused by one of the following: [!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)] @@ -25,13 +28,27 @@ The main cause for this problem is that the project is not importing mscorlib.dl - Residual components from an earlier installation that are incompatible with the latest installation remain. To resolve this problem, take one of the following actions: - + - Do not specify the /nostdlib option from the command line compiler. - -- Make sure that the project refers to the correct mscorlib.dll. - -- Reinstall the .NET Framework common language runtime (if the previous solutions do not solve the problem). -Optionally +- For modern SDK-style projects, ensure the project targets the correct .NET runtime. In your `.csproj` file, verify the `` property specifies the intended runtime: + + ```xml + + net8.0 + + ``` + + For multi-targeting projects, use `` (plural): + + ```xml + + net8.0;net48 + + ``` + +- For legacy project formats, make sure that the project refers to the correct mscorlib.dll. + +- Reinstall the .NET Framework common language runtime (if the previous solutions do not solve the problem). -- Reload the project in the Visual Studio. +- Reload the project in Visual Studio. From 532611ddd40d2cc113360f32ed82e3ca8f5ad180 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:24:04 -0400 Subject: [PATCH 12/18] Update CS0449 documentation to include all constraint types (#47687) * Initial plan * Update CS0449 documentation to include all constraint types Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Update date in CS0449.md to 08/01/2025 Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/csharp/misc/cs0449.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/csharp/misc/cs0449.md b/docs/csharp/misc/cs0449.md index 2a9902e33c071..728c9f21be044 100644 --- a/docs/csharp/misc/cs0449.md +++ b/docs/csharp/misc/cs0449.md @@ -1,7 +1,7 @@ --- description: "Compiler Error CS0449" title: "Compiler Error CS0449" -ms.date: 07/20/2015 +ms.date: 08/01/2025 f1_keywords: - "CS0449" helpviewer_keywords: @@ -12,7 +12,10 @@ ms.assetid: 32c07a2c-4c48-4d07-b643-72422a6b9fac The `'class'`, `'struct'`, `'unmanaged'`, `'notnull'`, and `'default'` constraints cannot be combined or duplicated, and must be specified first in the constraints list. -The constraints on the type parameter of a generic type or method must occur in a specific order: `class` or `struct` must be first, if present, then any interface constraints, and finally any constructor constraints. This error is caused by the `class` or `struct` constraint not appearing first. To resolve this error, reorder the constraint clauses. +The constraints on the type parameter of a generic type or method must occur in a specific order. You can apply at most one of the `class`, `struct`, `unmanaged`, `notnull`, or `default` constraints, and if you specify any of these constraints, it must be the first constraint specified for that type parameter. These are followed by interface constraints, and finally any constructor constraints. This error is caused by one of these primary constraints (`class`, `struct`, `unmanaged`, `notnull`, or `default`) not appearing first, or by attempting to combine multiple primary constraints. To resolve this error, reorder the constraint clauses or remove duplicate constraints. + +> [!NOTE] +> In a nullable context, the `class` constraint already implies `notnull`, so they cannot be combined. For comprehensive information about all constraint types and their rules, see [Constraints on type parameters](../programming-guide/generics/constraints-on-type-parameters.md). ## Example @@ -25,13 +28,19 @@ public interface I {} // Made public to avoid CS0703 public class C4 { - public void F1() where T : class, struct, I {} // CS0449 - public void F2() where T : I, struct {} // CS0449 - public void F3() where T : I, class {} // CS0449 + public void F1() where T : class, struct, I {} // CS0449 - cannot combine class and struct + public void F2() where T : I, struct {} // CS0449 - struct must be first + public void F3() where T : I, class {} // CS0449 - class must be first + public void F4() where T : class, notnull {} // CS0449 - class already implies notnull in nullable context + public void F5() where T : unmanaged, struct {} // CS0449 - cannot combine unmanaged and struct + public void F6() where T : I, unmanaged {} // CS0449 - unmanaged must be first + public void F7() where T : notnull, default {} // CS0449 - cannot combine notnull and default // OK - public void F4() where T : class {} - public void F5() where T : struct {} - public void F6() where T : I {} + public void F8() where T : class {} + public void F9() where T : struct {} + public void F10() where T : unmanaged {} + public void F11() where T : notnull {} + public void F12() where T : I {} } ``` From 1cef0229105eda729f7b109cc2c5bf12b5727cee Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:25:45 -0400 Subject: [PATCH 13/18] Add context clarification comments to interface method code snippets (#47683) * Initial plan * Add context clarification comments to interface method snippets Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Fix code comments to end with periods per style guide Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- .../finished/customer-relationship/ICustomer.cs | 3 +++ .../finished/customer-relationship/SampleCustomer.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs index 4f02e70810deb..ff32268b3d056 100644 --- a/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs +++ b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs @@ -11,6 +11,7 @@ public interface ICustomer /* // + // This method belongs in the ICustomer interface (ICustomer.cs). // Version 1: public decimal ComputeLoyaltyDiscount() { @@ -26,6 +27,7 @@ public decimal ComputeLoyaltyDiscount() /* // + // These methods belong in the ICustomer interface (ICustomer.cs). // Version 2: public static void SetLoyaltyThresholds( TimeSpan ago, @@ -65,6 +67,7 @@ public static void SetLoyaltyThresholds(TimeSpan ago, int minimumOrders, decimal private static decimal discountPercent = 0.10m; // + // These methods belong in the ICustomer interface (ICustomer.cs). public decimal ComputeLoyaltyDiscount() => DefaultLoyaltyDiscount(this); protected static decimal DefaultLoyaltyDiscount(ICustomer c) { diff --git a/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/SampleCustomer.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/SampleCustomer.cs index 93092ce33dcaf..e014a3e920769 100644 --- a/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/SampleCustomer.cs +++ b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/SampleCustomer.cs @@ -26,6 +26,7 @@ public void AddOrder(IOrder order) } // + // This method belongs in the SampleCustomer class (SampleCustomer.cs) that implements ICustomer. public decimal ComputeLoyaltyDiscount() { if (PreviousOrders.Any() == false) From 7c83e3f3ef1f07a14b0565e384eeae41a891d748 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 18:40:58 +0000 Subject: [PATCH 14/18] Clarify delegate as built-in reference type in documentation (#47668) * Initial plan * Initial analysis: Understanding delegate type classification issue Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Clarify delegate as built-in type in documentation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Remove package.json files from tracking * Remove unrelated .gitignore change for node_modules Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- .../csharp/language-reference/builtin-types/built-in-types.md | 4 ++-- .../language-reference/builtin-types/reference-types.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/csharp/language-reference/builtin-types/built-in-types.md b/docs/csharp/language-reference/builtin-types/built-in-types.md index 74f6f255ca6db..a50c0306a5645 100644 --- a/docs/csharp/language-reference/builtin-types/built-in-types.md +++ b/docs/csharp/language-reference/builtin-types/built-in-types.md @@ -37,7 +37,7 @@ The following table lists the C# built-in [reference](../keywords/reference-type | [`delegate`](reference-types.md#the-delegate-type) | | | [`dynamic`](reference-types.md#the-dynamic-type) | | -In the preceding tables, the C# type keyword from the left column (except [delegate](reference-types.md#the-delegate-type) and [dynamic](reference-types.md#the-dynamic-type)) is an alias for the corresponding .NET type. They're interchangeable. For example, the following declarations declare variables of the same type: +In the preceding tables, most C# type keywords from the left column are aliases for the corresponding .NET type. They're interchangeable. For example, the following declarations declare variables of the same type: ```csharp int a = 123; @@ -50,7 +50,7 @@ The `dynamic` type is similar to `object`. The main differences are: - You can't use `new dynamic()`. - You can't derive a type from the `dynamic` type. -The `delegate` keyword declares a type derived from . `System.Delegate` type is an abstract type. +The `delegate` keyword is a built-in reference type keyword that declares a type derived from . Unlike the other built-in type keywords, `delegate` isn't an alias for a specific .NET type. Instead, it declares custom types that derive from the abstract `System.Delegate` type. Similarly, `dynamic` represents runtime binding behavior rather than being a direct alias for a specific .NET type. The [`void`](void.md) keyword represents the absence of a type. You use it as the return type of a method that doesn't return a value. diff --git a/docs/csharp/language-reference/builtin-types/reference-types.md b/docs/csharp/language-reference/builtin-types/reference-types.md index 60360baa82556..c2fd09cf5acae 100644 --- a/docs/csharp/language-reference/builtin-types/reference-types.md +++ b/docs/csharp/language-reference/builtin-types/reference-types.md @@ -210,7 +210,7 @@ public delegate int AnotherDelegate(MyType m, long num); In .NET, `System.Action` and `System.Func` types provide generic definitions for many common delegates. You likely don't need to define new custom delegate types. Instead, you can create instantiations of the provided generic types. -A `delegate` is a reference type that can be used to encapsulate a named or an anonymous method. Delegates are similar to function pointers in C++; however, delegates are type-safe and secure. For applications of delegates, see [Delegates](../../programming-guide/delegates/index.md) and [Generic Delegates](../../programming-guide/generics/generic-delegates.md). Delegates are the basis for [Events](../../programming-guide/events/index.md). A delegate can be instantiated by associating it either with a named or anonymous method. +A `delegate` is a built-in reference type that can be used to encapsulate a named or an anonymous method. Delegates are similar to function pointers in C++; however, delegates are type-safe and secure. For applications of delegates, see [Delegates](../../programming-guide/delegates/index.md) and [Generic Delegates](../../programming-guide/generics/generic-delegates.md). Delegates are the basis for [Events](../../programming-guide/events/index.md). A delegate can be instantiated by associating it either with a named or anonymous method. The delegate must be instantiated with a method or lambda expression that has a compatible return type and input parameters. For more information on the degree of variance that is allowed in the method signature, see [Variance in Delegates](../../programming-guide/concepts/covariance-contravariance/using-variance-in-delegates.md). For use with anonymous methods, the delegate and the code to be associated with it are declared together. From 316c0c3d546791814b6c076ff85e2a51e46378d4 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:53:51 -0700 Subject: [PATCH 15/18] Add local SDK clarification to global.json paths documentation (#47673) --- docs/core/tools/global-json.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/core/tools/global-json.md b/docs/core/tools/global-json.md index 93d4f5298b7aa..829ba9743ddf3 100644 --- a/docs/core/tools/global-json.md +++ b/docs/core/tools/global-json.md @@ -95,6 +95,8 @@ Specifies the locations that should be considered when searching for a compatibl These paths are searched in the order they're defined and the first [matching](#matching-rules) SDK is used. +This feature enables using local SDK installations (such as SDKs relative to a repository root or placed in a custom folder) that aren't installed globally on the system. + > The "paths" feature only works when using commands that engage the .NET SDK, such as `dotnet run`. It does NOT affect scenarios such as running the native apphost launcher (`app.exe`), running with `dotnet app.dll`, or running with `dotnet exec app.dll`. To use the "paths" feature, you must use SDK commands like `dotnet run`. #### errorMessage From 570b678d708cb1e7efa2385eb60745c7d3ca264e Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:13:10 -0700 Subject: [PATCH 16/18] Add missing plugins-cache option to dotnet nuget locals documentation (#47582) --- docs/core/tools/dotnet-nuget-locals.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/core/tools/dotnet-nuget-locals.md b/docs/core/tools/dotnet-nuget-locals.md index 79d380e0ecd3a..48f3282a2f1fe 100644 --- a/docs/core/tools/dotnet-nuget-locals.md +++ b/docs/core/tools/dotnet-nuget-locals.md @@ -30,10 +30,11 @@ The `dotnet nuget locals` command clears or lists local NuGet resources in the h The cache location to list or clear. It accepts one of the following values: - * `all` - Indicates that the specified operation is applied to all cache types: http-request cache, global packages cache, and the temporary cache. + * `all` - Indicates that the specified operation is applied to all cache types: http-request cache, global packages cache, temporary cache, and plugins cache. * `http-cache` - Indicates that the specified operation is applied only to the http-request cache. The other cache locations aren't affected. * `global-packages` - Indicates that the specified operation is applied only to the global packages cache. The other cache locations aren't affected. * `temp` - Indicates that the specified operation is applied only to the temporary cache. The other cache locations aren't affected. + * `plugins-cache` - Indicates that the specified operation is applied only to the plugins cache. The other cache locations aren't affected. ## Options @@ -53,7 +54,7 @@ The `dotnet nuget locals` command clears or lists local NuGet resources in the h ## Examples -- Displays the paths of all the local cache directories (http-cache directory, global-packages cache directory, and temporary cache directory): +- Displays the paths of all the local cache directories (http-cache directory, global-packages cache directory, temporary cache directory, and plugins cache directory): ```dotnetcli dotnet nuget locals all -l @@ -65,7 +66,13 @@ The `dotnet nuget locals` command clears or lists local NuGet resources in the h dotnet nuget locals http-cache --list ``` -- Clears all files from all local cache directories (http-cache directory, global-packages cache directory, and temporary cache directory): +- Displays the path for the local plugins cache directory: + + ```dotnetcli + dotnet nuget locals plugins-cache --list + ``` + +- Clears all files from all local cache directories (http-cache directory, global-packages cache directory, temporary cache directory, and plugins cache directory): ```dotnetcli dotnet nuget locals all --clear @@ -83,6 +90,12 @@ The `dotnet nuget locals` command clears or lists local NuGet resources in the h dotnet nuget locals temp -c ``` +- Clears all files in local plugins cache directory: + + ```dotnetcli + dotnet nuget locals plugins-cache -c + ``` + ## Troubleshooting For information on common problems and errors while using the `dotnet nuget locals` command, see [Managing the NuGet cache](/nuget/consume-packages/managing-the-nuget-cache). From 4dd666311dbcaccc2e9ca3e9e8dad7c01ef12d04 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:13:36 -0700 Subject: [PATCH 17/18] Add resolution guidance to CS1023 compiler error documentation (#47631) * Initial plan * Add resolution section to CS1023 documentation with corrected examples Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/csharp/misc/cs1023.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/csharp/misc/cs1023.md b/docs/csharp/misc/cs1023.md index 71ef35f3ac103..64164c814de3d 100644 --- a/docs/csharp/misc/cs1023.md +++ b/docs/csharp/misc/cs1023.md @@ -14,6 +14,8 @@ Embedded statement cannot be a declaration or labeled statement An embedded statement, such as the statements following an **if** statement, can contain neither declarations nor labeled statements. + To resolve this error, wrap the embedded statement in braces to create a block statement. In C#, unlike C/C++, variable declarations and labeled statements must be contained within a block statement to properly define their scope. + The following sample generates CS1023 twice: ```csharp @@ -24,9 +26,33 @@ public class a { if (1) int i; // CS1023, declaration is not valid here - + if (1) xx : i++; // CS1023, labeled statement is not valid here } } ``` + +## Example - Corrected code + +To fix this error, use braces to create a block statement: + +```csharp +// CS1023 - Fixed.cs +public class a +{ + public static void Main() + { + if (1) + { + int i; // Fixed: declaration is now in a block statement + } + + int j = 0; + if (1) + { + xx : j++; // Fixed: labeled statement is now in a block statement + } + } +} +``` From ccfcd50033e44d009bce9cc5962dc78f4a47f950 Mon Sep 17 00:00:00 2001 From: Steve Molloy Date: Mon, 4 Aug 2025 16:13:50 -0700 Subject: [PATCH 18/18] Update docs for SRC.MemoryCache configuration element (#46805) --- .../file-schema/runtime/memorycache-element-cache-settings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md b/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md index 42f8af861e424..4ea2ccdf510dc 100644 --- a/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md +++ b/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md @@ -38,9 +38,9 @@ Defines an element that is used to configure a cache that is based on the object can grow to. The default value is 0, which means that the class's autosize heuristics are used by default.| +|`CacheMemoryLimitMegabytes`|The maximum memory size, in megabytes, that an instance of a object can grow to. The default value is 0, which means that the class's autosize heuristics are used by default. (This setting is only effective on .Net Framework.)| |`Name`|The name of the cache configuration.| -|`PhysicalMemoryLimitPercentage`|The percentage of physical memory that can be used by the cache. The default value is 0, which means that the class's autosize heuristics are used by default.| +|`PhysicalMemoryLimitPercentage`|percentage of total physical memory usage on the system (by all processes) at which the cache will begin to evict entries. The default value is 0, which means that the class's autosize heuristics are used by default.| |`PollingInterval`|A value that indicates the time interval after which the cache implementation compares the current memory load against the absolute and percentage-based memory limits that are set for the cache instance. The value is entered in "HH:MM:SS" format.| ### Child Elements