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;
A new StreamWriter.
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. |
NGWS Runtime Security:
FileIOPermissionAccess | Read permission to the path. |
File Class | File Members | System.IO Namespace | File.CreateText Overload List