StreamWriter Constructor

StreamWriter Constructor

 

Initializes a new instance of the StreamWriter class.

Namespace:   System.IO
Assembly:  mscorlib (in mscorlib.dll)

NameDescription
System_CAPS_pubmethodStreamWriter(Stream)

Initializes a new instance of the StreamWriter class for the specified stream by using UTF-8 encoding and the default buffer size.

System_CAPS_pubmethodStreamWriter(Stream, Encoding)

Initializes a new instance of the StreamWriter class for the specified stream by using the specified encoding and the default buffer size.

System_CAPS_pubmethodStreamWriter(Stream, Encoding, Int32)

Initializes a new instance of the StreamWriter class for the specified stream by using the specified encoding and buffer size.

System_CAPS_pubmethodStreamWriter(Stream, Encoding, Int32, Boolean)

Initializes a new instance of the StreamWriter class for the specified stream by using the specified encoding and buffer size, and optionally leaves the stream open.

System_CAPS_pubmethodStreamWriter(String)

Initializes a new instance of the StreamWriter class for the specified file by using the default encoding and buffer size.

System_CAPS_pubmethodStreamWriter(String, Boolean)

Initializes a new instance of the StreamWriter class for the specified file by 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.

System_CAPS_pubmethodStreamWriter(String, Boolean, Encoding)

Initializes a new instance of the StreamWriter class for the specified file by 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.

System_CAPS_pubmethodStreamWriter(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.

Return to top
Show:
© 2016 Microsoft