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!

File.CreateText (String)

Creates a StreamWriter that writes a new text file on the specified path.

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

Parameters

path
The path to write the text file to.

Return Value

A new StreamWriter.

Exceptions

Exception Type Condition
ArgumentNullException path is a null reference (in Visual Basic Nothing).
SecurityException The caller does not have the required permission.
ArgumentException The file name is empty or contains only whitespaces.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Read permission to the path.

See Also

File Class | File Members | System.IO Namespace | File.CreateText Overload List