true if the output stream can be closed by the object; false otherwise. By default, false.
Remarks
Since ZipWriter does not create the output stream it is given, it does not close it when the zip operation is finished.
However, there are situations where it is convenient to close the output stream when ZipWriter is done. This is especially true when the output stream is exclusively tied to the ZipWriter, is not needed afterwards and ZipWriter is wrapped in a "using" statement (see example).
In these cases, setting the property to true will make ZipWriter close the output stream when Dispose is called.
The output stream will not be closed when CloseZipFile is called.
When the property is set to true, it allows for cleanup of both ZipWriter and the output stream in one "using" statement. When set to false it is your responsibility to close the output stream once ZipWriter is done with it.
Example
When the property is set to true, it allows for cleanup of both ZipWriter and the output stream in one 'using' statement (Example 1).
When the property is set to false, it is your responsibility to close the output stream once ZipWriter is done with it (Example 2).
using( ZipWriter writer = new ZipWriter( new SomeOutputStream(), false, true ) )
{
// Use 'writer'
}
Using writer AsNew ZipWriter(New SomeOutputStream(), False, True)
' Use 'writer'
EndUsing
using( Stream outputStream = new SomeOutputStream() )
{
using( ZipWriter writer = new ZipWriter( outputStream, false, false ) )
{
// Use 'writer'
}
}
Using outputStream As Stream = New SomeOutputStream()
Using writer AsNew ZipWriter(outputStream, False, False)
' Use 'writer'
EndUsingEndUsing
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2