Update Listing 10.20 to fix warnings
MODIFY
src/Chapter10/Listing10.20.DefiningAFinalizer.cs
src/Chapter10/Listing10.20.DefiningAFinalizer.cs
@@ -34,8 +34,8 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_20
}
}
- public FileStream Stream { get; private set; }
- public FileInfo File { get; private set; }
+ public FileStream? Stream { get; private set; }
+ public FileInfo? File { get; private set; }
public void Close()
{
@@ -48,8 +48,6 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_20
{
Console.WriteLine(exception);
}
- Stream = null;
- File = null;
}
}
}
\ No newline at end of file

Update Listing 10.20 to fix warnings