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::ReadAllLines Method
.NET Framework (current version)
Opens a text file, reads all lines of the file into a string array, and then closes the file.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | ReadAllLines(String^) | Opens a text file, reads all lines of the file, and then closes the file. |
![]() ![]() | ReadAllLines(String^, Encoding^) | Opens a file, reads all lines of the file with the specified encoding, and then closes the file. |
Show:

