Creates a new instance of the StreamWriter class for the specified stream, using the default encoding and buffer size.
[Visual Basic] Overloads Public Sub New( _ ByVal stream As Stream _ ) [C#] public StreamWriter( Stream stream ); [C++] public: StreamWriter( Stream* stream ); [JScript] public function StreamWriter( stream : Stream );
Exception Type | Condition |
---|---|
ArgumentException | stream is empty. |
ArgumentNullException | stream is null. |
StreamWriter Class | StreamWriter Members | System.IO Namespace | StreamWriter Constructor Overload List