Export (0) Print
Expand All
2 out of 4 rated this helpful - Rate this topic

File.WriteAllText Method

Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.

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

  Name Description
Public method Static member WriteAllText(String, String) Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.
Public method Static member WriteAllText(String, String, Encoding) Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.