次の方法で共有


StreamWriter Constructor

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

Initializes a new instance of the StreamWriter class.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 StreamWriter(Stream) Initializes a new instance of the StreamWriter class for the specified stream, using UTF-8 encoding and the default buffer size.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 StreamWriter(String) When it is called by trusted applications, initializes a new instance of the StreamWriter class for the specified file on the specified path, using the default encoding and buffer size.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 StreamWriter(Stream, Encoding) Initializes a new instance of the StreamWriter class for the specified stream, using the specified encoding and the default buffer size.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 StreamWriter(String, Boolean) When it is called by trusted applications, 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.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 StreamWriter(Stream, Encoding, Int32) Initializes a new instance of the StreamWriter class for the specified stream, using the specified encoding and buffer size.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 StreamWriter(String, Boolean, Encoding) When it is called by trusted applications, 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.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 StreamWriter(String, Boolean, Encoding, Int32) When it is called by trusted applications, 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.

Top