ReadAllText(String,Encoding,NativeFileShare) Method
Opens a text file, reads all lines of the file, and then closes the file.
public static System.string ReadAllText(
System.string ,
System.Text.Encoding ,
NativeFileShare
)
'Declaration
Public Overloads Shared Function ReadAllText( _
ByVal As System.String, _
ByVal As System.Text.Encoding, _
Optional ByVal As NativeFileShare _
) As System.String
Parameters
- path
- The file to open for reading.
- encoding
- The encoding.
- sharing
- The sharing.
Return Value
A string containing all lines of the file.