[]
        
(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)
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)
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.