AuthenticatedStream Constructor (Stream, Boolean)


Initializes a new instance of the AuthenticatedStream class.

Namespace:   System.Net.Security
Assembly:  System (in System.dll)

protected AuthenticatedStream(
	Stream innerStream,
	bool leaveInnerStreamOpen


Type: System.IO.Stream

A Stream object used by the AuthenticatedStream for sending and receiving data.

Type: System.Boolean

A Boolean that indicates whether closing this AuthenticatedStream object also closes innerStream.

Exception Condition

innerStream is null.


innerStream is equal to Null.

When you specify true for the leaveStreamOpen parameter, closing the AuthenticatedStream has no effect on the innerStream stream.

This constructor is provided for implementers of authenticated streams, and can be called only by classes that are derived from AuthenticatedStream.

.NET Framework
Available since 2.0
Return to top