[]
        
(Showing Draft Content)

C1.Util.DX.Storage.NativeFile.ReadAllText

ReadAllText Method

ReadAllText(string)

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

Declaration
public static string ReadAllText(string path)
Public Shared Function ReadAllText(path As String) As String
Parameters
Type Name Description
string path

The file to open for reading.

Returns
Type Description
string

A string containing all lines of the file.

ReadAllText(string, Encoding, NativeFileShare)

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

Declaration
public static string ReadAllText(string path, Encoding encoding, NativeFileShare sharing = NativeFileShare.Read)
Public Shared Function ReadAllText(path As String, encoding As Encoding, Optional sharing As NativeFileShare = NativeFileShare.Read) As String
Parameters
Type Name Description
string path

The file to open for reading.

Encoding encoding

The encoding.

NativeFileShare sharing

The sharing.

Returns
Type Description
string

A string containing all lines of the file.