From 77f36c7194f405684b00518882dfceaaf92b68b0 Mon Sep 17 00:00:00 2001 From: Anirban Ghatak Date: Sat, 17 Nov 2018 05:17:25 -0500 Subject: [PATCH] Update variable names. (#23679) Updated the variable names in the code so that it goes correctly with the example text. --- guide/english/csharp/null-conditional-operator/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/english/csharp/null-conditional-operator/index.md b/guide/english/csharp/null-conditional-operator/index.md index 28522c9fb8..5f3b40dbf5 100644 --- a/guide/english/csharp/null-conditional-operator/index.md +++ b/guide/english/csharp/null-conditional-operator/index.md @@ -25,7 +25,7 @@ However, in C# 6.0 null-conditional operators were introduced, so now the above be represented as follows: ```csharp -Address address = student?.Address; +Address address = employee?.Address; ``` If employee is null, address will simply be assigned null, and no NullReferenceExeception will occur. @@ -33,7 +33,7 @@ This becomes more useful with deeper object graphs, as you can handle a chain of For example: ```csharp -string city = student?.Address?.City; +string city = employee?.Address?.City; ``` Null-conditional operators are short-circuiting, so as soon as one check of conditional member access