Gets or sets a boolean value indicating whether the input stream can be closed by the object.
Syntax
'Declaration
Public Property AllowInputStreamClosure As Boolean
'Usage
Dim instance As ZipReader
Dim value As Boolean
instance.AllowInputStreamClosure = value
value = instance.AllowInputStreamClosure
public bool AllowInputStreamClosure {get; set;}
Property Value
true if the input stream can be closed by the object; false otherwise. By default, false.
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 As New ZipReader(New SomeInputStream(), True)
' Use 'reader'
End Using
using( Stream inputStream = new SomeInputStream() )
{
using( ZipReader reader = new ZipReader( inputStream, false ) )
{
// Use 'reader'
}
}
Using inputStream As Stream = New SomeInputStream()
Using reader As New ZipReader(inputStream, False)
' Use 'reader'
End Using
End Using
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
See Also