Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
A string array containing all lines of the file.
| Exception | Condition |
|---|---|
| ArgumentNullException | path is a null reference (Nothing in Visual Basic). |