Export (0) Print Expand All 9 out of 10 rated this helpful -
Rate this topic  File.CreateText Method  Creates or opens a file
for writing UTF-8 encoded text.  Namespace:  System.IO Assembly:
 mscorlib (in mscorlib.dll)
public static StreamWriter CreateText(         string path
Type: System.String  The file to be opened for writing.  Return
Value  Type: System.IO.StreamWriter A StreamWriter that writes
to the specified file using UTF-8 encoding.  The caller does not
have the required permission.   path is a zero-length string,
contains only white space, or contains one or more invalid
characters as defined by InvalidPathChars.   path is null.   The
specified path, file name, or both exceed the system-defined
maximum length. For example, on Windows-based platforms, paths
must be less than 248 characters, and file names must be less
than 260 characters.   The specified path is invalid (for
example, it is on an unmapped drive).   path is in an invalid
format.  This method is equivalent to the StreamWriter(String,
Bool