diff --git a/.openpublishing.redirection.core.json b/.openpublishing.redirection.core.json index d4ae0275cd422..f8f2eb7c2fd15 100644 --- a/.openpublishing.redirection.core.json +++ b/.openpublishing.redirection.core.json @@ -1245,11 +1245,11 @@ }, { "source_path_from_root": "/docs/core/tutorials/using-on-mac-vs-full-solution.md", - "redirect_url": "/dotnet/core/tutorials/library-with-visual-studio-mac" + "redirect_url": "/dotnet/core/tutorials/library-with-visual-studio-code" }, { "source_path_from_root": "/docs/core/tutorials/using-on-mac-vs.md", - "redirect_url": "/dotnet/core/tutorials/with-visual-studio-mac" + "redirect_url": "/dotnet/core/tutorials/with-visual-studio-code" }, { "source_path_from_root": "/docs/core/tutorials/using-on-macos.md", diff --git a/.openpublishing.redirection.fsharp.json b/.openpublishing.redirection.fsharp.json index 957b1a2f2c70b..fbb09f5d5e684 100644 --- a/.openpublishing.redirection.fsharp.json +++ b/.openpublishing.redirection.fsharp.json @@ -76,8 +76,7 @@ }, { "source_path_from_root": "/docs/fsharp/tutorials/getting-started/getting-started-visual-studio-for-mac.md", - "redirect_url": "/dotnet/fsharp/get-started/get-started-with-visual-studio-for-mac", - "redirect_document_id": true + "redirect_url": "/dotnet/fsharp/get-started/get-started-vscode", }, { "source_path_from_root": "/docs/fsharp/tutorials/getting-started/getting-started-visual-studio.md", diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index 4a31ab023e1f7..6fc556f2e0cf9 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -223,7 +223,7 @@ | Resource Management - DevOps Infrastructure | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DevOpsInfrastructure/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DevOpsInfrastructure-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.DevOpsInfrastructure_1.0.0-beta.1/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/) | | Resource Management - DevTest Labs | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DevTestLabs/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DevTestLabs-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/) | | Resource Management - Digital Twins | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.DigitalTwins/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DigitalTwins-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DigitalTwins_1.3.0/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/) | -| Resource Management - DNS | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.1.1)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dns-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.1.1/sdk/dns/Azure.ResourceManager.Dns/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.2.0-beta.1/sdk/dns/Azure.ResourceManager.Dns/) | +| Resource Management - DNS | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.1.1)
NuGet [1.2.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.2.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Dns-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.1.1/sdk/dns/Azure.ResourceManager.Dns/)
GitHub [1.2.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.2.0-beta.2/sdk/dns/Azure.ResourceManager.Dns/) | | Resource Management - DNS Resolver | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DnsResolver/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DnsResolver/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DnsResolver-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DnsResolver_1.1.0/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DnsResolver_1.2.0-beta.1/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/) | | Resource Management - Dynatrace | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Dynatrace/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Dynatrace-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dynatrace_1.1.0/sdk/dynatrace/Azure.ResourceManager.Dynatrace/) | | Resource Management - Edge Order | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.EdgeOrder/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.EdgeOrder-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EdgeOrder_1.1.0/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/) | @@ -287,7 +287,7 @@ | Resource Management - Network Cloud | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.NetworkCloud/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.NetworkCloud-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetworkCloud_1.0.1/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/) | | Resource Management - Network Function | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.NetworkFunction/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.NetworkFunction-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.NetworkFunction_1.0.0-beta.4/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/) | | Resource Management - New Relic Observability | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.NewRelicObservability/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.NewRelicObservability-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NewRelicObservability_1.1.0/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/) | -| Resource Management - Nginx | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Nginx-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.0.0/sdk/nginx/Azure.ResourceManager.Nginx/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.1.0-beta.1/sdk/nginx/Azure.ResourceManager.Nginx/) | +| Resource Management - Nginx | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Nginx-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.0.0/sdk/nginx/Azure.ResourceManager.Nginx/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.1.0-beta.2/sdk/nginx/Azure.ResourceManager.Nginx/) | | Resource Management - Notification Hubs | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.NotificationHubs/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.NotificationHubs/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.NotificationHubs-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NotificationHubs_1.1.0/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NotificationHubs_1.2.0-beta.1/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/) | | Resource Management - Oracle Database | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.OracleDatabase/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.OracleDatabase-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.OracleDatabase_1.0.0/sdk/oracle/Azure.ResourceManager.OracleDatabase/) | | Resource Management - Orbital | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Orbital/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Orbital-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Orbital_1.1.0/sdk/orbital/Azure.ResourceManager.Orbital/) | @@ -344,6 +344,7 @@ | Resource Management - Subscriptions | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Subscription/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Subscription-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Subscription_1.1.0/sdk/subscription/Azure.ResourceManager.Subscription/) | | Resource Management - Support | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Support/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Support-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Support_1.1.0/sdk/support/Azure.ResourceManager.Support/) | | Resource Management - Synapse | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.Synapse/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Synapse-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Synapse_1.2.0/sdk/synapse/Azure.ResourceManager.Synapse/) | +| Resource Management - Terraform | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Terraform/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Terraform-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.Terraform_1.0.0-beta.1/sdk/terraform/Azure.ResourceManager.Terraform/) | | Resource Management - Traffic Manager | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.TrafficManager-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.1.2/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/) | | Resource Management - Trusted Signing | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.TrustedSigning/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.TrustedSigning-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.TrustedSigning_1.0.0-beta.1/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/) | | Resource Management - Voice Services | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.VoiceServices/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.VoiceServices-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VoiceServices_1.0.1/sdk/voiceservices/Azure.ResourceManager.VoiceServices/) | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index 9cf3005102c4f..195f3f7ff0ca5 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -229,7 +229,7 @@ | Resource Management - DevOps Infrastructure | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DevOpsInfrastructure/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DevOpsInfrastructure-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.DevOpsInfrastructure_1.0.0-beta.1/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/) | | Resource Management - DevTest Labs | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DevTestLabs/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DevTestLabs-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/) | | Resource Management - Digital Twins | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.DigitalTwins/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DigitalTwins-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DigitalTwins_1.3.0/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/) | -| Resource Management - DNS | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.1.1)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dns-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.1.1/sdk/dns/Azure.ResourceManager.Dns/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.2.0-beta.1/sdk/dns/Azure.ResourceManager.Dns/) | +| Resource Management - DNS | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.1.1)
NuGet [1.2.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.2.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Dns-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.1.1/sdk/dns/Azure.ResourceManager.Dns/)
GitHub [1.2.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.2.0-beta.2/sdk/dns/Azure.ResourceManager.Dns/) | | Resource Management - DNS Resolver | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DnsResolver/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DnsResolver/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DnsResolver-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DnsResolver_1.1.0/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DnsResolver_1.2.0-beta.1/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/) | | Resource Management - Dynatrace | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Dynatrace/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Dynatrace-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dynatrace_1.1.0/sdk/dynatrace/Azure.ResourceManager.Dynatrace/) | | Resource Management - Edge Order | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.EdgeOrder/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.EdgeOrder-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EdgeOrder_1.1.0/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/) | @@ -294,7 +294,7 @@ | Resource Management - Network Cloud | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.NetworkCloud/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.NetworkCloud-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetworkCloud_1.0.1/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/) | | Resource Management - Network Function | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.NetworkFunction/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.NetworkFunction-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.NetworkFunction_1.0.0-beta.4/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/) | | Resource Management - New Relic Observability | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.NewRelicObservability/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.NewRelicObservability-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NewRelicObservability_1.1.0/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/) | -| Resource Management - Nginx | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Nginx-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.0.0/sdk/nginx/Azure.ResourceManager.Nginx/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.1.0-beta.1/sdk/nginx/Azure.ResourceManager.Nginx/) | +| Resource Management - Nginx | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Nginx-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.0.0/sdk/nginx/Azure.ResourceManager.Nginx/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.1.0-beta.2/sdk/nginx/Azure.ResourceManager.Nginx/) | | Resource Management - Notification Hubs | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.NotificationHubs/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.NotificationHubs/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.NotificationHubs-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NotificationHubs_1.1.0/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NotificationHubs_1.2.0-beta.1/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/) | | Resource Management - Oracle Database | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.OracleDatabase/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.OracleDatabase-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.OracleDatabase_1.0.0/sdk/oracle/Azure.ResourceManager.OracleDatabase/) | | Resource Management - Orbital | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Orbital/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Orbital-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Orbital_1.1.0/sdk/orbital/Azure.ResourceManager.Orbital/) | @@ -351,6 +351,7 @@ | Resource Management - Subscriptions | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Subscription/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Subscription-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Subscription_1.1.0/sdk/subscription/Azure.ResourceManager.Subscription/) | | Resource Management - Support | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Support/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Support-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Support_1.1.0/sdk/support/Azure.ResourceManager.Support/) | | Resource Management - Synapse | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.Synapse/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Synapse-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Synapse_1.2.0/sdk/synapse/Azure.ResourceManager.Synapse/) | +| Resource Management - Terraform | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Terraform/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Terraform-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.Terraform_1.0.0-beta.1/sdk/terraform/Azure.ResourceManager.Terraform/) | | Resource Management - Traffic Manager | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.TrafficManager-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.1.2/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/) | | Resource Management - Trusted Signing | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.TrustedSigning/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.TrustedSigning-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.TrustedSigning_1.0.0-beta.1/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/) | | Resource Management - Voice Services | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.VoiceServices/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.VoiceServices-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VoiceServices_1.0.1/sdk/voiceservices/Azure.ResourceManager.VoiceServices/) | diff --git a/docs/core/compatibility/9.0.md b/docs/core/compatibility/9.0.md index 00f6eeb3848f3..f27c23d9b0df5 100644 --- a/docs/core/compatibility/9.0.md +++ b/docs/core/compatibility/9.0.md @@ -39,6 +39,7 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff | [BinaryReader.GetString() returns "\uFFFD" on malformed sequences](core-libraries/9.0/binaryreader.md) | Behavioral change | Preview 7 | | [Creating type of array of System.Void not allowed](core-libraries/9.0/type-instance.md) | Behavioral change | Preview 1 | | [Default `Equals()` and `GetHashCode()` throw for types marked with `InlineArrayAttribute`](core-libraries/9.0/inlinearrayattribute.md) | Behavioral change | Preview 6 | +| [EnumConverter validates registered types to be enum](core-libraries/9.0/enumconverter.md) | Behavioral change | Preview 7 | | [FromKeyedServicesAttribute no longer injects non-keyed parameter](core-libraries/9.0/non-keyed-params.md) | Behavioral change | RC 1 | | [IncrementingPollingCounter initial callback is asynchronous](core-libraries/9.0/async-callback.md) | Behavioral change | RC 1 | | [Inline array struct size limit is enforced](core-libraries/9.0/inlinearray-size.md) | Behavioral change | Preview 1 | diff --git a/docs/core/compatibility/core-libraries/9.0/enumconverter.md b/docs/core/compatibility/core-libraries/9.0/enumconverter.md new file mode 100644 index 0000000000000..4cabe37af6c53 --- /dev/null +++ b/docs/core/compatibility/core-libraries/9.0/enumconverter.md @@ -0,0 +1,38 @@ +--- +title: "Breaking change: EnumConverter validates registered types to be enum" +description: Learn about the .NET 9 breaking change where EnumConverter now validates that the type to be registered is an enum type. +ms.date: 10/04/2024 +--- +# EnumConverter validates registered types to be enum + + is a type converter that converts to and from an `enum` type. EnumConverter now validates that the type to be registered is of an `enum` type. + +## Previous behavior + +Previously, the type to be registered was not validated to be an `enum` type. + +## New behavior + +Starting in .NET 9, throws an if the type to be converted is not an `enum` type. Any derived classes of should also respect this requirement. + +## Version introduced + +.NET 9 Preview 7 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +It is logical to enforce the requirement that be used to convert to and from `enum` types only. It was likely an oversight that this requirement wasn't added earlier. + +However, the primary driving factor for this change was for trimming purposes. [Trimming](../../../deploying/trimming/prepare-libraries-for-trimming.md) doesn't trim `enum` types, but using for `enum` types required annotation for an `enum` type. This means that using `EnumConverter` generates unnecessary trim warnings. A recent change removed the annotation requirement. Part of the reason for that change was to enforce that `EnumConverter` only be used with `enums`. + +## Recommended action + +There is no easy workaround if an is used to convert to and from a non-`enum` type. + +## Affected APIs + +- constructor diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 6fd30bbce9f7b..46ab742692d9b 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -30,6 +30,8 @@ items: href: core-libraries/9.0/biginteger-limit.md - name: Creating type of array of System.Void not allowed href: core-libraries/9.0/type-instance.md + - name: EnumConverter validates registered types to be enum + href: core-libraries/9.0/enumconverter.md - name: "`Equals`/`GetHashCode` throw for `InlineArrayAttribute` types" href: core-libraries/9.0/inlinearrayattribute.md - name: FromKeyedServicesAttribute no longer injects non-keyed parameter @@ -1260,6 +1262,8 @@ items: href: core-libraries/9.0/binaryreader.md - name: Creating type of array of System.Void not allowed href: core-libraries/9.0/type-instance.md + - name: EnumConverter validates registered types to be enum + href: core-libraries/9.0/enumconverter.md - name: "`Equals`/`GetHashCode` throw for `InlineArrayAttribute` types" href: core-libraries/9.0/inlinearrayattribute.md - name: FromKeyedServicesAttribute no longer injects non-keyed parameter diff --git a/docs/core/install/media/install-sdk/mac-install-selection.png b/docs/core/install/media/install-sdk/mac-install-selection.png deleted file mode 100644 index efaac2b31b0fe..0000000000000 Binary files a/docs/core/install/media/install-sdk/mac-install-selection.png and /dev/null differ diff --git a/docs/core/porting/media/upgrade-assistant-overview/visual-studio-upgrade.png b/docs/core/porting/media/upgrade-assistant-overview/visual-studio-upgrade.png deleted file mode 100644 index fbdc71559a699..0000000000000 Binary files a/docs/core/porting/media/upgrade-assistant-overview/visual-studio-upgrade.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/breakpoint-hit.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/breakpoint-hit.png deleted file mode 100644 index a9a596591e82a..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/breakpoint-hit.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/breakpoint-settings.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/breakpoint-settings.png deleted file mode 100644 index 026fd5521f947..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/breakpoint-settings.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/immediate-window-output.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/immediate-window-output.png deleted file mode 100644 index 5f5a5ce86cb5c..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/immediate-window-output.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/immediate-window.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/immediate-window.png deleted file mode 100644 index f860734b3d205..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/immediate-window.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/locals-window.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/locals-window.png deleted file mode 100644 index 4ec6940858433..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/locals-window.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/set-breakpoint-in-editor.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/set-breakpoint-in-editor.png deleted file mode 100644 index f1828be931aaa..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/set-breakpoint-in-editor.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/step-into-method.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/step-into-method.png deleted file mode 100644 index f4a62b08769e0..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/step-into-method.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/terminal-hello-world.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/terminal-hello-world.png deleted file mode 100644 index 455f533cd8440..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/terminal-hello-world.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/visual-studio-toolbar-debug.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/visual-studio-toolbar-debug.png deleted file mode 100644 index 2e5bde0d133f7..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/visual-studio-toolbar-debug.png and /dev/null differ diff --git a/docs/core/tutorials/media/debugging-with-visual-studio-mac/visual-studio-toolbar-release.png b/docs/core/tutorials/media/debugging-with-visual-studio-mac/visual-studio-toolbar-release.png deleted file mode 100644 index 54f140b1a4949..0000000000000 Binary files a/docs/core/tutorials/media/debugging-with-visual-studio-mac/visual-studio-toolbar-release.png and /dev/null differ diff --git a/docs/core/tutorials/media/library-with-visual-studio-mac/add-showcase-project.png b/docs/core/tutorials/media/library-with-visual-studio-mac/add-showcase-project.png deleted file mode 100644 index 64b210c945631..0000000000000 Binary files a/docs/core/tutorials/media/library-with-visual-studio-mac/add-showcase-project.png and /dev/null differ diff --git a/docs/core/tutorials/media/library-with-visual-studio-mac/solution-dock-icon.png b/docs/core/tutorials/media/library-with-visual-studio-mac/solution-dock-icon.png deleted file mode 100644 index ff0a5f67d9caf..0000000000000 Binary files a/docs/core/tutorials/media/library-with-visual-studio-mac/solution-dock-icon.png and /dev/null differ diff --git a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-build-panel.png b/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-build-panel.png deleted file mode 100644 index d2ce493df8979..0000000000000 Binary files a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-build-panel.png and /dev/null differ diff --git a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-console-window.png b/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-console-window.png deleted file mode 100644 index f373471c5d145..0000000000000 Binary files a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-console-window.png and /dev/null differ diff --git a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-error-button.png b/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-error-button.png deleted file mode 100644 index 8ea4b1a4f4587..0000000000000 Binary files a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-error-button.png and /dev/null differ diff --git a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-new-project-options.png b/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-new-project-options.png deleted file mode 100644 index 0854cfaa92e7e..0000000000000 Binary files a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-new-project-options.png and /dev/null differ diff --git a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-new-project.png b/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-new-project.png deleted file mode 100644 index 17806225a0571..0000000000000 Binary files a/docs/core/tutorials/media/library-with-visual-studio-mac/visual-studio-mac-new-project.png and /dev/null differ diff --git a/docs/core/tutorials/media/publishing-with-visual-studio-mac/copy-path.png b/docs/core/tutorials/media/publishing-with-visual-studio-mac/copy-path.png deleted file mode 100644 index 4a9295998ecd4..0000000000000 Binary files a/docs/core/tutorials/media/publishing-with-visual-studio-mac/copy-path.png and /dev/null differ diff --git a/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-context-menu.png b/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-context-menu.png deleted file mode 100644 index 100ff27a5ff93..0000000000000 Binary files a/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-context-menu.png and /dev/null differ diff --git a/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-folder.png b/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-folder.png deleted file mode 100644 index 32bf55e4d517f..0000000000000 Binary files a/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-folder.png and /dev/null differ diff --git a/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-to-folder-dialog.png b/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-to-folder-dialog.png deleted file mode 100644 index a88e0d10dac75..0000000000000 Binary files a/docs/core/tutorials/media/publishing-with-visual-studio-mac/publish-to-folder-dialog.png and /dev/null differ diff --git a/docs/core/tutorials/media/publishing-with-visual-studio-mac/toolbar-release.png b/docs/core/tutorials/media/publishing-with-visual-studio-mac/toolbar-release.png deleted file mode 100644 index 54f140b1a4949..0000000000000 Binary files a/docs/core/tutorials/media/publishing-with-visual-studio-mac/toolbar-release.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/build-library-context-menu.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/build-library-context-menu.png deleted file mode 100644 index 29ed20e1b3fb9..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/build-library-context-menu.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/failed-test-window.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/failed-test-window.png deleted file mode 100644 index 0445799f700a4..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/failed-test-window.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/save-file-as-dialog.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/save-file-as-dialog.png deleted file mode 100644 index 95f776eb9ace6..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/save-file-as-dialog.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-edit-references.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-edit-references.png deleted file mode 100644 index bd26cfe41b454..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-edit-references.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-new-project-name.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-new-project-name.png deleted file mode 100644 index 81a20c6a3f553..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-new-project-name.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-dock-icon.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-dock-icon.png deleted file mode 100644 index ff023e169b7c9..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-dock-icon.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-failure.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-failure.png deleted file mode 100644 index 82c8a4f1162c5..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-failure.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-pass.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-pass.png deleted file mode 100644 index ce3c3f2793aea..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-pass.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-project.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-project.png deleted file mode 100644 index fbbdedddaa5e5..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-mac-unit-test-project.png and /dev/null differ diff --git a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-toolbar-release.png b/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-toolbar-release.png deleted file mode 100644 index 54f140b1a4949..0000000000000 Binary files a/docs/core/tutorials/media/testing-library-with-visual-studio-mac/visual-studio-toolbar-release.png and /dev/null differ diff --git a/docs/core/tutorials/media/with-visual-studio-mac/hello-world-update.png b/docs/core/tutorials/media/with-visual-studio-mac/hello-world-update.png deleted file mode 100644 index 7b05af74c31f7..0000000000000 Binary files a/docs/core/tutorials/media/with-visual-studio-mac/hello-world-update.png and /dev/null differ diff --git a/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-dialog.png b/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-dialog.png deleted file mode 100644 index 0547d654b4752..0000000000000 Binary files a/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-dialog.png and /dev/null differ diff --git a/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-options.png b/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-options.png deleted file mode 100644 index 69b669e5ffa87..0000000000000 Binary files a/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-options.png and /dev/null differ diff --git a/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-project.png b/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-project.png deleted file mode 100644 index 1422760866b88..0000000000000 Binary files a/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-new-project.png and /dev/null differ diff --git a/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-output.png b/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-output.png deleted file mode 100644 index d857ed81f193d..0000000000000 Binary files a/docs/core/tutorials/media/with-visual-studio-mac/visual-studio-mac-output.png and /dev/null differ diff --git a/docs/csharp/language-reference/statements/checked-and-unchecked.md b/docs/csharp/language-reference/statements/checked-and-unchecked.md index ec5fd964156e6..76dc7d1303a0a 100644 --- a/docs/csharp/language-reference/statements/checked-and-unchecked.md +++ b/docs/csharp/language-reference/statements/checked-and-unchecked.md @@ -1,7 +1,7 @@ --- -title: "checked and unchecked statements - control the overflow-checking context" -description: "The `checked` and `unchecked` statements control the overflow-checking context. In a checked context, overflow causes an exception to be thrown. In an unchecked context, the result is truncated." -ms.date: 11/22/2022 +title: "The checked and unchecked statements - overflow-checking" +description: "Control the overflow-checking context. In a checked context, overflow causes an exception to be thrown. In an unchecked context, the result is truncated." +ms.date: 10/29/2022 f1_keywords: - "checked_CSharpKeyword" - "unchecked_CSharpKeyword" @@ -11,14 +11,14 @@ helpviewer_keywords: - "statements [C#], checked and unchecked" - "overflow checking [C#]" --- -# checked and unchecked statements (C# reference) +# The checked and unchecked statements (C# reference) -The `checked` and `unchecked` statements specify the overflow-checking context for integral-type arithmetic operations and conversions. When integer arithmetic overflow occurs, the overflow-checking context defines what happens. In a checked context, a is thrown; if overflow happens in a constant expression, a compile-time error occurs. In an unchecked context, the operation result is truncated by discarding any high-order bits that don't fit in the destination type. For example, in the case of addition it wraps from the maximum value to the minimum value. The following example shows the same operation in both a checked and unchecked context: +The `checked` and `unchecked` statements specify the overflow-checking context for integral-type arithmetic operations and conversions. When integer arithmetic overflow occurs, the overflow-checking context defines what happens. In a checked context, a is thrown; if overflow happens in a constant expression, a compile-time error occurs. In an unchecked context, the operation result is truncated by discarding any high-order bits that don't fit in the destination type. For example, addition wraps from the maximum value to the minimum value. The following example shows the same operation in both a checked and unchecked context: :::code language="csharp" interactive="try-dotnet-method" source="snippets/checked-and-unchecked/Program.cs" id="MainExample"::: > [!NOTE] -> The behavior of *user-defined* operators and conversions in the case of overflow can differ from the one described in the preceding paragraph. In particular, [user-defined checked operators](../operators/arithmetic-operators.md#user-defined-checked-operators) might not throw an exception in a checked context. +> The overflow behavior of *user-defined* operators and conversions can differ from the one described in the preceding paragraph. In particular, [user-defined checked operators](../operators/arithmetic-operators.md#user-defined-checked-operators) might not throw an exception in a checked context. For more information, see the [Arithmetic overflow and division by zero](../operators/arithmetic-operators.md#arithmetic-overflow-and-division-by-zero) and [User-defined checked operators](../operators/arithmetic-operators.md#user-defined-checked-operators) sections of the [Arithmetic operators](../operators/arithmetic-operators.md) article. @@ -32,6 +32,16 @@ The `checked` and `unchecked` statements and operators only affect the overflow- At the preceding example, the first invocation of the `Multiply` local function shows that the `checked` statement doesn't affect the overflow-checking context within the `Multiply` function as no exception is thrown. At the second invocation of the `Multiply` function, the expression that calculates the second argument of the function is evaluated in a checked context and results in an exception as it's textually inside the block of the `checked` statement. +The behavior of `checked` and `unchecked` depends on the type and the operation. Even for integers, operations like `unchecked(x / 0)` always throw because there's no sensible behavior. Check the behavior for the type and the operation to understand how the `checked` and `unchecked` keywords affect your code. + +## Numeric types and overflow-checking context + +The `checked` and `unchecked` keywords primarily apply to integral types where there's a sensible overflow behavior. The wraparound behavior where `T.MaxValue + 1` becomes `T.MinValue` is sensible in a two's complement value. The represented value isn't *correct* since it can't fit in the storage for the type. Therefore, the bits are representative of the lower n-bits of the full result. + +For types like `decimal`, `float`, `double`, and `Half` that represent a more complex value or a one's complement value, wraparound isn't sensible. It can't be used to compute larger or more accurate results, so `unchecked` isn't beneficial. + +`float`, `double`, and `Half` have sensible saturating values for `PositiveInfinity` and `NegativeInfinity`, so you can detect overflow in an `unchecked` context. For `decimal`, no such limits exist, and saturating at `MaxValue` can lead to errors or confusion. Operations that use `decimal` throw in both a `checked` and `unchecked` context. + ## Operations affected by the overflow-checking context The overflow-checking context affects the following operations: @@ -46,9 +56,9 @@ The overflow-checking context affects the following operations: ## Default overflow-checking context -If you don't specify the overflow-checking context, the value of the [**CheckForOverflowUnderflow**](../compiler-options/language.md#checkforoverflowunderflow) compiler option defines the default context for non-constant expressions. By default the value of that option is unset and integral-type arithmetic operations and conversions are executed in an **unchecked** context. +If you don't specify the overflow-checking context, the value of the [**CheckForOverflowUnderflow**](../compiler-options/language.md#checkforoverflowunderflow) compiler option defines the default context for nonconstant expressions. By default the value of that option is unset and integral-type arithmetic operations and conversions are executed in an **unchecked** context. -Constant expressions are evaluated by default in a checked context and a compile-time error occurs in the case of overflow. You can explicitly specify an unchecked context for a constant expression with the `unchecked` statement or operator. +Constant expressions are evaluated by default in a checked context and overflow causes a compile-time error. You can explicitly specify an unchecked context for a constant expression with the `unchecked` statement or operator. ## C# language specification diff --git a/docs/fundamentals/runtime-libraries/system-nullable{t}.md b/docs/fundamentals/runtime-libraries/system-nullable{t}.md index 09fa9cfc061f9..ef632b0eee058 100644 --- a/docs/fundamentals/runtime-libraries/system-nullable{t}.md +++ b/docs/fundamentals/runtime-libraries/system-nullable{t}.md @@ -1,7 +1,7 @@ --- -title: System.Nullable\ structure -description: Learn about the System.Nullable\ structure. -ms.date: 12/31/2023 +title: System.Nullable structure +description: Learn about the System.Nullable structure. +ms.date: 10/31/2024 --- # System.Nullable\ structure