Skip to content

Commit 18f1702

Browse files
Nigel-Ecmajskeet
andcommitted
Update standard/expressions.md
Co-authored-by: Jon Skeet <[email protected]>
1 parent 1981023 commit 18f1702

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

standard/expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ A *null_conditional_member_access* expression `E` is of the form `P?.A`. The me
17671767
- If `T` is a non-nullable value type, then the type of `E` is `T?`, and the meaning of `E` is the same as the meaning of:
17681768

17691769
```csharp
1770-
((object)P == null) ? (T?)null : P.GetValueOrDefault().A
1770+
((object)P == null) ? (T?)null : P.Value.A
17711771
```
17721772

17731773
Except that `P` is evaluated only once.

0 commit comments

Comments
 (0)