diff --git a/vs4win/Chapter09/WorkingWithStreams/Program.cs b/vs4win/Chapter09/WorkingWithStreams/Program.cs index 695536f..d77b53c 100644 --- a/vs4win/Chapter09/WorkingWithStreams/Program.cs +++ b/vs4win/Chapter09/WorkingWithStreams/Program.cs @@ -75,11 +75,11 @@ finally { xml.Dispose(); WriteLine("The XML writer's unmanaged resources have been disposed."); - if (xmlFileStream != null) - { - xmlFileStream.Dispose(); - WriteLine("The file stream's unmanaged resources have been disposed."); - } + } + if (xmlFileStream != null) + { + xmlFileStream.Dispose(); + WriteLine("The file stream's unmanaged resources have been disposed."); } } diff --git a/vscode/Chapter09/WorkingWithStreams/Program.cs b/vscode/Chapter09/WorkingWithStreams/Program.cs index 695536f..d77b53c 100644 --- a/vscode/Chapter09/WorkingWithStreams/Program.cs +++ b/vscode/Chapter09/WorkingWithStreams/Program.cs @@ -75,11 +75,11 @@ finally { xml.Dispose(); WriteLine("The XML writer's unmanaged resources have been disposed."); - if (xmlFileStream != null) - { - xmlFileStream.Dispose(); - WriteLine("The file stream's unmanaged resources have been disposed."); - } + } + if (xmlFileStream != null) + { + xmlFileStream.Dispose(); + WriteLine("The file stream's unmanaged resources have been disposed."); } }