true if the input stream can be closed by the object; false otherwise. By default, false.
Remarks
Since ZipReader does not create the input stream it is given, it does not close it when the unzip operation is finished.
However, there are situations where it is convenient to close the input stream when ZipReader is done. This is especially true when the input stream is exclusively tied to the ZipReader, is not needed afterwards, and ZipReader is wrapped in a "using" statement (see example).
In these cases, setting the property to true will make ZipReader close the input stream when Dispose is called.
When the property is set to true, it allows for cleanup of both ZipReader and the input stream in one "using" statement.
When the property is set to false, it is your responsibility to close the input stream once ZipReader is done with it.
Example
When the property is set to true, it allows for cleanup of both ZipReader and the input stream in one 'using' statement (Example 1).
When the property is set to false, it is your responsibility to close the input stream once ZipReader is done with it (Example 2).
using( ZipReader reader = new ZipReader( new SomeInputStream(), true ) )
{
// Use 'reader'
}
Using reader AsNew ZipReader(New SomeInputStream(), True)
' Use 'reader'
EndUsing
using( Stream inputStream = new SomeInputStream() )
{
using( ZipReader reader = new ZipReader( inputStream, false ) )
{
// Use 'reader'
}
}
Using inputStream As Stream = New SomeInputStream()
Using reader AsNew ZipReader(inputStream, False)
' Use 'reader'
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