Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

File.ReadAllText Method

Opens a text file, reads all lines of the file into a string, and then closes the file.

Name Description
File.ReadAllText (String) Opens a text file, reads all lines of the file, and then closes the file.
File.ReadAllText (String, Encoding) Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

Community Additions

Show:
© 2017 Microsoft