From f641fc678514c397e0d9f3cdd667aff91b9a5271 Mon Sep 17 00:00:00 2001 From: Adit Sheth Date: Wed, 18 Dec 2024 07:48:29 -0800 Subject: [PATCH 1/2] Fixed bug 44001. --- docs/csharp/whats-new/csharp-13.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/csharp/whats-new/csharp-13.md b/docs/csharp/whats-new/csharp-13.md index ab366b5fe698e..9b0b591e039d5 100644 --- a/docs/csharp/whats-new/csharp-13.md +++ b/docs/csharp/whats-new/csharp-13.md @@ -76,6 +76,11 @@ You can read the details of the changes in the [proposal specification](~/_cshar The implicit "from the end" index operator, `^`, is now allowed in an object initializer expression. For example, you can now initialize an array in an object initializer as shown in the following code: ```csharp +public class TimerRemaining +{ + public int[] buffer { get; set; } = new int[10]; +} + var countdown = new TimerRemaining() { buffer = @@ -94,7 +99,9 @@ var countdown = new TimerRemaining() }; ``` -The preceding example creates an array that counts down from 9 to 0. In versions before C# 13, the `^` operator can't be used in an object initializer. You need to index the elements from the front. +The `TimerRemaining` class includes a `buffer` array initialized to a length of 10. The preceding example assigns values to this array using the "from the end" index operator (`^`), effectively creating an array that counts down from 9 to 0. + +In versions before C# 13, the `^` operator can't be used in an object initializer. You need to index the elements from the front. ## `ref` and `unsafe` in iterators and `async` methods From 81352dfb5ba536ed089475a3d15c5976432451ce Mon Sep 17 00:00:00 2001 From: Adit Sheth Date: Thu, 2 Jan 2025 04:50:17 -0800 Subject: [PATCH 2/2] Fixed typo. --- .../cloud-native/infrastructure-resiliency-azure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture/cloud-native/infrastructure-resiliency-azure.md b/docs/architecture/cloud-native/infrastructure-resiliency-azure.md index 983e524ed57cd..71adb7a11543b 100644 --- a/docs/architecture/cloud-native/infrastructure-resiliency-azure.md +++ b/docs/architecture/cloud-native/infrastructure-resiliency-azure.md @@ -85,7 +85,7 @@ The cloud thrives on scaling. The ability to increase/decrease system resources We encouraged the best practice of implementing programmatic retry operations in an earlier section. Keep in mind that many Azure services and their corresponding client SDKs also include retry mechanisms. The following list summarizes retry features in the many of the Azure services that are discussed in this book: -- *Azure Cosmos DB.* The class from the client API automatically retires failed attempts. The number of retries and maximum wait time are configurable. Exceptions thrown by the client API are either requests that exceed the retry policy or non-transient errors. +- *Azure Cosmos DB.* The class from the client API automatically retries failed attempts. The number of retries and maximum wait time are configurable. Exceptions thrown by the client API are either requests that exceed the retry policy or non-transient errors. - *Azure Redis Cache.* The Redis StackExchange client uses a connection manager class that includes retries on failed attempts. The number of retries, specific retry policy and wait time are all configurable.