You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/concept/tim-from-marketing/.docs/introduction.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
In C#, the `null` literal is used to denote the absence of a value. A _nullable_ type is a type that allows for `null` values.
6
6
7
-
Prior to C# 8.0, reference types were always nullable and value types were not. A value type can be made nullable though by appending it with a question mark (`?`).
7
+
Prior to C# 8.0, reference types were always nullable and value types were not. A value type can be made nullable by appending a question mark to it (`?`).
8
8
9
9
```csharp
10
10
stringnullableReferenceType="hello";
@@ -17,7 +17,7 @@ int? nullableValueType = 5; // Define nullable value type
17
17
nullableValueType=null; // Valid as type is nullable
18
18
```
19
19
20
-
Accessing a member of a variable which value is `null` will compile fine, but result in a `NullReferenceException` being thrown at runtime:
20
+
Accessing a null variable's member does not cause a compile error, but results in a `NullReferenceException` being thrown at runtime:
0 commit comments