| FileReadAllText Method (String, Encoding) |
Opens a text file, reads all lines of the file, and then closes the file.
Namespace: CMS.AzureStorageAssembly: CMS.AzureStorage (in CMS.AzureStorage.dll) Version: 13.0.131
Syntaxpublic override string ReadAllText(
string path,
Encoding encoding
)
Parameters
- path
- Type: SystemString
Path to file - encoding
- Type: System.TextEncoding
The character encoding to use
Return Value
Type:
String
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | path is null |
| ArgumentException | path is empty or contains invalid characters |
| PathTooLongException | path is too long |
| FileNotFoundException | path does not exist |
See Also