NegotiateStream Constructor (Stream, Boolean)
Collapse the table of content
Expand the table of content

NegotiateStream Constructor (Stream, Boolean)

 

Initializes a new instance of the NegotiateStream class using the specified Stream and stream closure behavior.

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

new : 
        innerStream:Stream *
        leaveInnerStreamOpen:bool -> NegotiateStream

Parameters

innerStream
Type: System.IO.Stream

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

leaveInnerStreamOpen
Type: System.Boolean

true to indicate that closing this NegotiateStream has no effect on innerstream; false to indicate that closing this NegotiateStream also closes innerStream. See the Remarks section for more information.

Exception Condition
ArgumentNullException

innerStream is null.

- or -

innerStream is equal to Null.

When you specify true for the leaveStreamOpen parameter, closing the NegotiateStream has no effect on the innerStream stream; you must explicitly close innerStream when you no longer need it.

The following code example demonstrates calling this constructor. This code example is part of a larger example provided for the NegotiateStream class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft