Jaa


FileIO.ReadLinesAsync Method

Definition

Overloads

ReadLinesAsync(IStorageFile)

Reads the contents of the specified file and returns lines of text.

ReadLinesAsync(IStorageFile, UnicodeEncoding)

Reads the contents of the specified file using the specified character encoding and returns lines of text.

ReadLinesAsync(IStorageFile)

Reads the contents of the specified file and returns lines of text.

public:
 static IAsyncOperation<IVector<Platform::String ^> ^> ^ ReadLinesAsync(IStorageFile ^ file);
/// [Windows.Foundation.Metadata.Overload("ReadLinesAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IVector<winrt::hstring>> ReadLinesAsync(IStorageFile const& file);
[Windows.Foundation.Metadata.Overload("ReadLinesAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IList<string>> ReadLinesAsync(IStorageFile file);
function readLinesAsync(file)
Public Shared Function ReadLinesAsync (file As IStorageFile) As IAsyncOperation(Of IList(Of String))

Parameters

file
IStorageFile

The file to read.

Returns

When this method completes successfully, it returns the contents of the file as a list (type IVector) of lines of text. Each line of text in the list is represented by a String object.

Attributes

Remarks

This method uses the character encoding of the specified file. If you want to specify different encoding, call ReadLinesAsync(IStorageFile, UnicodeEncoding) instead.

See also

Applies to

ReadLinesAsync(IStorageFile, UnicodeEncoding)

Reads the contents of the specified file using the specified character encoding and returns lines of text.

public:
 static IAsyncOperation<IVector<Platform::String ^> ^> ^ ReadLinesAsync(IStorageFile ^ file, UnicodeEncoding encoding);
/// [Windows.Foundation.Metadata.Overload("ReadLinesWithEncodingAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IVector<winrt::hstring>> ReadLinesAsync(IStorageFile const& file, UnicodeEncoding const& encoding);
[Windows.Foundation.Metadata.Overload("ReadLinesWithEncodingAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IList<string>> ReadLinesAsync(IStorageFile file, UnicodeEncoding encoding);
function readLinesAsync(file, encoding)
Public Shared Function ReadLinesAsync (file As IStorageFile, encoding As UnicodeEncoding) As IAsyncOperation(Of IList(Of String))

Parameters

file
IStorageFile

The file to read.

encoding
UnicodeEncoding

The character encoding to use.

Returns

When this method completes successfully, it returns the contents of the file as a list (type IVector) of lines of text. Each line of text in the list is represented by a String object.

Attributes

See also

Applies to