Update variable names. (#23679)

Updated the variable names in the code so that it goes correctly with the example text.
pull/23656/head^2
Anirban Ghatak 2018-11-17 05:17:25 -05:00 committed by Aditya
parent c2156bd136
commit 77f36c7194
1 changed files with 2 additions and 2 deletions

View File

@ -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