PipelineWriter.Close Method ()

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Closes the stream to the pipeline.

Namespace:   System.Management.Automation.Runspaces
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

public abstract void Close()

Exception Condition
ObjectDisposedException

The stream has already been disposed of.

Once this call is made and the pipeline is closed, the following conditions apply:

  • All subsequent calls to the IsOpen property will return false.

  • All subsequent calls to a write operation will cause an ObjectDisposedException exception to be thrown.

  • All subsequent calls to the Close method are silently ignored.

Return to top

Community Additions

ADD
Show: