NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

StreamWriter Constructor (String)

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

[Visual Basic]
Overloads Public Sub New( _
   ByVal path As String _
)
[C#]
public StreamWriter(
   string path
);
[C++]
public: StreamWriter(
   String* path
);
[JScript]
public function StreamWriter(
   path : String
);

Parameters

path
The complete file path to write to.

Exceptions

Exception Type Condition
AccessException Access is denied.
ArgumentException path is empty.
ArgumentNullException path is a null reference (in Visual Basic Nothing).
DirectoryNotFoundException The directory to write to is not found.
IOException path includes an incorrect or invalid syntax for file name, directory name, or volume label syntax.
SecurityException The caller does not have the required permission.

See Also

StreamWriter Class | StreamWriter Members | System.IO Namespace | StreamWriter Constructor Overload List