Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
StreamWriter Constructor

StreamWriter Constructor

Initializes a new instance of the StreamWriter class.

Name Description
StreamWriter (Stream) Initializes a new instance of the StreamWriter class for the specified stream, using UTF-8 encoding and the default buffer size.

Supported by the .NET Compact Framework.

StreamWriter (String) Initializes a new instance of the StreamWriter class for the specified file on the specified path, using the default encoding and buffer size.

Supported by the .NET Compact Framework.

StreamWriter (Stream, Encoding) Initializes a new instance of the StreamWriter class for the specified stream, using the specified encoding and the default buffer size.

Supported by the .NET Compact Framework.

StreamWriter (String, Boolean) Initializes a new instance of the StreamWriter class for the specified file on the specified path, using the default encoding and buffer size. If the file exists, it can be either overwritten or appended to. If the file does not exist, this constructor creates a new file.

Supported by the .NET Compact Framework.

StreamWriter (Stream, Encoding, Int32) Initializes a new instance of the StreamWriter class for the specified stream, using the specified encoding and buffer size.

Supported by the .NET Compact Framework.

StreamWriter (String, Boolean, Encoding) Initializes a new instance of the StreamWriter class for the specified file on the specified path, using the specified encoding and default buffer size. If the file exists, it can be either overwritten or appended to. If the file does not exist, this constructor creates a new file.

Supported by the .NET Compact Framework.

StreamWriter (String, Boolean, Encoding, Int32) Initializes a new instance of the StreamWriter class for the specified file on the specified path, using the specified encoding and buffer size. If the file exists, it can be either overwritten or appended to. If the file does not exist, this constructor creates a new file.

Supported by the .NET Compact Framework.

Community Additions

ADD
Show:
© 2015 Microsoft