FileIO.ReadLinesAsync FileIO.ReadLinesAsync FileIO.ReadLinesAsync FileIO.ReadLinesAsync FileIO.ReadLinesAsync Method

Definition

Overloads

ReadLinesAsync(IStorageFile) ReadLinesAsync(IStorageFile) ReadLinesAsync(IStorageFile) ReadLinesAsync(IStorageFile) ReadLinesAsync(IStorageFile)

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

ReadLinesAsync(IStorageFile, UnicodeEncoding) ReadLinesAsync(IStorageFile, UnicodeEncoding) ReadLinesAsync(IStorageFile, UnicodeEncoding) ReadLinesAsync(IStorageFile, UnicodeEncoding) ReadLinesAsync(IStorageFile, UnicodeEncoding)

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

ReadLinesAsync(IStorageFile) ReadLinesAsync(IStorageFile) ReadLinesAsync(IStorageFile) ReadLinesAsync(IStorageFile) ReadLinesAsync(IStorageFile)

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

public : static IAsyncOperation<IVector<Platform::String>> ReadLinesAsync(IStorageFile file)
static IAsyncOperation<IVector<winrt::hstring>> ReadLinesAsync(IStorageFile file) const;
public static IAsyncOperation<IList<string>> ReadLinesAsync(IStorageFile file)
Public Shared Function ReadLinesAsync(file As IStorageFile) As IAsyncOperation<IList<string>>(Of IVector)
Windows.Storage.FileIO.readLinesAsync(file).done( /* Your success and error handlers */ );

Parameters

file
IStorageFile IStorageFile IStorageFile

The file to read.

Returns

IAsyncOperation<IList<string>> IAsyncOperation<IList<string>> IAsyncOperation<IList<string>>

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.

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

ReadLinesAsync(IStorageFile, UnicodeEncoding) ReadLinesAsync(IStorageFile, UnicodeEncoding) ReadLinesAsync(IStorageFile, UnicodeEncoding) ReadLinesAsync(IStorageFile, UnicodeEncoding) 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)
static IAsyncOperation<IVector<winrt::hstring>> ReadLinesAsync(IStorageFile file, UnicodeEncoding encoding) const;
public static IAsyncOperation<IList<string>> ReadLinesAsync(IStorageFile file, UnicodeEncoding encoding)
Public Shared Function ReadLinesAsync(file As IStorageFile, encoding As UnicodeEncoding) As IAsyncOperation<IList<string>>(Of IVector)
Windows.Storage.FileIO.readLinesAsync(file, encoding).done( /* Your success and error handlers */ );

Parameters

file
IStorageFile IStorageFile IStorageFile

The file to read.

encoding
UnicodeEncoding UnicodeEncoding UnicodeEncoding

The character encoding to use.

Returns

IAsyncOperation<IList<string>> IAsyncOperation<IList<string>> IAsyncOperation<IList<string>>

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.

See also