Updated to use nullabilit modifier on value type as an example of null.
MODIFY
src/Chapter02/Listing02.19.AssigningNullToAString.cs
src/Chapter02/Listing02.19.AssigningNullToAString.cs
@@ -4,15 +4,16 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_19
{
public static void Main()
{
- string faxNumber;
+ int? age;
+
//...
- // Clear the value of faxNumber
- faxNumber = null;
+ // Clear the value of age
+ age = null;
//...
- System.Console.WriteLine(faxNumber);
+ System.Console.WriteLine($"The age is: {age}");
}
}
}

Updated to use nullabilit modifier on value type as an example of null.