Skip to content

Commit 72ecf2e

Browse files
BillWagnergewarren
andcommitted
Apply suggestions from code review
Co-authored-by: Genevieve Warren <[email protected]>
1 parent 41245e3 commit 72ecf2e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docfx.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,9 @@
814814
"_csharplang/proposals/field-keyword.md": "This proposal introduces a new keyword, `field`, that accesses the compiler generated backing field in a property accessor.",
815815
"_csharplang/proposals/unbound-generic-types-in-nameof.md": "This proposal introduces the ability to use unbound generic types such as `List<>` in `nameof` expressions. The type argument isn't required.",
816816
"_csharplang/proposals/first-class-span-types.md": "This proposal provides several implicit conversions to `Span<T>` and `ReadOnlySpan<T>` that enable library authors to have fewer overloads and developers to write code that resolves to faster Span based APIs",
817-
"_csharplang/proposals/simple-lambda-parameters-with-modifiers.md": "This proposal provides allows lambda parmaeters to be declared with modifiers without requiring their type names. You can add modifiers like `ref` and `out` to lambda parameters without specifying their type.",
818-
"_csharplang/proposals/partial-events-and-constructors.md": "This proposal provides allows partial events and constructors to be declared in partial classes. This allows the event and constructor to be split across class declarations.",
819-
"_csharplang/proposals/null-conditional-assignment.md": "This proposal provides allows the null conditional operator to be used for the destination of assignment expressions. This allows you to assign a value to a property or field only if the left side is not null.",
817+
"_csharplang/proposals/simple-lambda-parameters-with-modifiers.md": "This proposal allows lambda parameters to be declared with modifiers without requiring their type names. You can add modifiers like `ref` and `out` to lambda parameters without specifying their type.",
818+
"_csharplang/proposals/partial-events-and-constructors.md": "This proposal allows partial events and constructors to be declared in partial classes. The event and constructor can be split across class declarations.",
819+
"_csharplang/proposals/null-conditional-assignment.md": "This proposal allows the null conditional operator to be used for the destination of assignment expressions. This allows you to assign a value to a property or field only if the left side is not null.",
820820
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "Learn about any breaking changes since the initial release of C# 10 and included in C# 11",
821821
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 8.md": "Learn about any breaking changes since the initial release of C# 11 and included in C# 12",
822822
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md": "Learn about any breaking changes since the initial release of C# 12 and included in C# 13",

docs/csharp/language-reference/operators/member-access-operators.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,17 @@ Beginning in C# 14, assignment is permissible with a null conditional access exp
153153

154154
:::code language="csharp" source="snippets/shared/NullCoalescingOperator.cs" id="NullForgivingAssignment":::
155155

156-
The preceding example shows assignment to a property and an indexed element on a reference type that might be null. An important behavior for this assignment is that the expression on the right hand side of the `=` is evaluated only once the left hand side is known to be non-null. For example, in the following code, the function `GenerateNextIndex` is call only when the `values` array isn't null. If the `values` array is null, `GenerateNextIndex` isn't called:
156+
The preceding example shows assignment to a property and an indexed element on a reference type that might be null. An important behavior for this assignment is that the expression on the right-hand side of the `=` is evaluated only when the left-hand side is known to be non-null. For example, in the following code, the function `GenerateNextIndex` is called only when the `values` array isn't null. If the `values` array is null, `GenerateNextIndex` isn't called:
157157

158158
:::code language="csharp" source="snippets/shared/NullCoalescingOperator.cs" id="NullForgivingAssignment":::
159159

160160
In other words, the preceding code is equivalent to the following code using an `if` statement for the null check:
161161

162162
:::code language="csharp" source="snippets/shared/NullCoalescingOperator.cs" id="EquivalentIfStatement":::
163163

164-
In addition to assignment, any form of [compound assignment](./assignment-operator.md#compound-assignment), such as `+=` or `-=` are allowed. However, increment (`++`) and decrement (`--`) aren't allowed.
164+
In addition to assignment, any form of [compound assignment](./assignment-operator.md#compound-assignment), such as `+=` or `-=`, are allowed. However, increment (`++`) and decrement (`--`) aren't allowed.
165165

166-
This enhancement doesn't classify a null conditional expression as a variable. It can't be `ref` assigned, nor can it be assigned to a `ref` variable, or passed to a method as a `ref` or `out` argument.
166+
This enhancement doesn't classify a null conditional expression as a variable. It can't be `ref` assigned, nor can it be assigned to a `ref` variable or passed to a method as a `ref` or `out` argument.
167167

168168
### Thread-safe delegate invocation
169169

docs/csharp/whats-new/csharp-14.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ customer?.Order = GetCurrentOrder();
121121

122122
The right side of the `=` operator is evaluated only when the left side is not null. If `customer` is null, the code won't call `GetCurrentOrder`.
123123

124-
You In addition to assignment, you can use null conditional member access operators with compound assignment operators (`+=`, `-=` and others). However, increment and decrement, `++` and `--` aren't allowed.
124+
In addition to assignment, you can use null conditional member access operators with compound assignment operators (`+=`, `-=`, and others). However, increment and decrement, `++` and `--`, aren't allowed.
125125

126126
You can learn more in the language reference article on the [conditional member access](../language-reference/operators/member-access-operators.md#null-conditional-operators--and-) and the feature specification for [null conditional assignment](~/_csharplang/proposals/null-conditional-assignment.md)
127127

0 commit comments

Comments
 (0)